Tooltip for bed temperature displays values where it resolves from. CURA-2007

This commit is contained in:
Jack Ha 2016-08-08 13:39:54 +02:00
parent c0dd19ce08
commit 97f9bcacf1
2 changed files with 14 additions and 1 deletions

View file

@ -316,6 +316,17 @@ class ExtruderManager(QObject):
return result
## Get all extruder values for a certain setting.
#
# This is exposed to qml for display purposes
#
# \param key The key of the setting to retieve values for.
#
# \return String representing the extruder values
@pyqtSlot(str, result="QList<int>")
def getInstanceExtruderValues(self, key):
return ExtruderManager.getExtruderValues(key)
## Get the value for a setting from a specific extruder.
#
# This is exposed to SettingFunction to use in value functions.

View file

@ -157,7 +157,9 @@ Item {
var tooltipText = catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders") + ".";
if ((resolve != "None") && (stackLevel != 0)) {
// We come here if a setting has a resolve and the setting is not manually edited.
tooltipText += " " + catalog.i18nc("@label", "The value is resolved from the individual value ") + value + ".";
// Individual value does not work yet.
tooltipText += " " + catalog.i18nc("@label", "The value is resolved from per-extruder values ") + "[" + ExtruderManager.getInstanceExtruderValues(definition.key) + "].";
}
base.showTooltip(tooltipText);
}