diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 56fd789564..1892b9d5a6 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -51,27 +51,34 @@ Item { id: globalProfileSelection - text: { - var result = Cura.MachineManager.activeQualityName; - if (Cura.MachineManager.activeQualityLayerHeight > 0) { - result += " "; - result += " - "; - result += Cura.MachineManager.activeQualityLayerHeight + "mm"; - result += ""; - } - return result; - } + text: generateActiveQualityText() enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1 - width: Math.floor(parent.width * 0.55) height: UM.Theme.getSize("setting_control").height anchors.left: globalProfileLabel.right anchors.right: parent.right tooltip: Cura.MachineManager.activeQualityName style: UM.Theme.styles.sidebar_header_button - activeFocusOnPress: true; + activeFocusOnPress: true menu: ProfileMenu { } + function generateActiveQualityText () { + var result = "" + + if (Cura.MachineManager.activeQualityName) { + result += Cura.MachineManager.activeQualityName + + if (Cura.MachineManager.activeQualityLayerHeight > 0) { + result += " " + result += " - " + result += Cura.MachineManager.activeQualityLayerHeight + "mm" + result += "" + } + } + + return result + } + UM.SimpleButton { id: customisedSettings