From fe53a4381932a231753d01a32751d508d2842172 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 09:41:25 +0200 Subject: [PATCH 01/11] Combine support checkbox & support extruder selection & remove main extruder selection CURA-790 --- resources/qml/SidebarSimple.qml | 141 +++++++++++++------------------- 1 file changed, 55 insertions(+), 86 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index d303952a8d..36d92b6e78 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -175,38 +175,35 @@ Item } Rectangle { - id: helpersCellLeft + id: helpersCell anchors.top: infillCellRight.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left - width: parent.width/100*35 - UM.Theme.getSize("default_margin").width + anchors.right: parent.right height: childrenRect.height Label{ + id: adhesionHelperLabel anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - //: Helpers selection label - text: catalog.i18nc("@label:listbox","Helpers:"); + anchors.verticalCenter: brimCheckBox.verticalCenter + width: parent.width/100*35 - 3 * UM.Theme.getSize("default_margin").width + //: Bed adhesion label + text: catalog.i18nc("@label:listbox","Bed Adhesion:"); font: UM.Theme.getFont("default"); color: UM.Theme.getColor("text"); } - } - Rectangle { - id: helpersCellRight - anchors.top: helpersCellLeft.top - anchors.left: helpersCellLeft.right - width: parent.width/100*65 - UM.Theme.getSize("default_margin").width - height: childrenRect.height CheckBox{ id: brimCheckBox property bool hovered_ex: false anchors.top: parent.top - anchors.left: parent.left + anchors.left: adhesionHelperLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width //: Setting enable skirt adhesion checkbox - text: catalog.i18nc("@option:check","Generate Brim"); + text: catalog.i18nc("@option:check","Print Brim"); style: UM.Theme.styles.checkbox; checked: platformAdhesionType.properties.value == "brim" @@ -231,16 +228,31 @@ Item } } } + + Label{ + id: supportHelperLabel + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.verticalCenter: supportCheckBox.verticalCenter + width: parent.width/100*35 - 3 * UM.Theme.getSize("default_margin").width + //: Support label + text: catalog.i18nc("@label:listbox","Support:"); + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); + } + CheckBox{ id: supportCheckBox + visible: machineExtruderCount.properties.value <= 1 property bool hovered_ex: false anchors.top: brimCheckBox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: parent.left + anchors.left: supportHelperLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width //: Setting enable support checkbox - text: catalog.i18nc("@option:check","Generate Support Structure"); + text: catalog.i18nc("@option:check","Print Support Structure"); style: UM.Theme.styles.checkbox; checked: supportEnabled.properties.value == "True" @@ -264,74 +276,27 @@ Item } } } - } - function populateExtruderModel() - { - extruderModel.clear(); - for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { - print(catalog.i18nc("@label", "Extruder %1").arg(extruder)); - extruderModel.append({ - text: catalog.i18nc("@label", "Extruder %1").arg(extruder) - }) - } - } - - Rectangle { - id: multiExtrusionCell - anchors.top: helpersCellRight.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: parent.left - width: parent.width - height: childrenRect.height - visible: machineExtruderCount.properties.value > 1 - - Label { - id: mainExtruderLabel - text: catalog.i18nc("@label:listbox","Print object with:") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: mainExtruderCombobox.verticalCenter - } - ComboBox { - id: mainExtruderCombobox - model: extruderModel - anchors.top: parent.top - anchors.left: supportExtruderLabel.right - style: UM.Theme.styles.combobox - currentIndex: mainExtruderNr.properties.value - onActivated: { - mainExtruderNr.setPropertyValue("value", index) - } - } - - Label { - id: supportExtruderLabel - visible: supportCheckBox.checked - text: catalog.i18nc("@label:listbox","Print support with:") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - width: base.width/100* 35 - 2*UM.Theme.getSize("default_margin").width - height: visible ? mainExtruderLabel.height : 0 - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: supportExtruderCombobox.verticalCenter - } ComboBox { id: supportExtruderCombobox - visible: supportCheckBox.checked + visible: machineExtruderCount.properties.value > 1 model: extruderModel - height: visible ? mainExtruderCombobox.height : 0 - anchors.top: mainExtruderCombobox.bottom + + anchors.top: brimCheckBox.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: supportExtruderLabel.right + anchors.left: supportHelperLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width + width: parent.width/100*45 + style: UM.Theme.styles.combobox - currentIndex: supportExtruderNr.properties.value + currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0 onActivated: { - supportExtruderNr.setPropertyValue("value", index) + if(index==0) { + supportEnabled.setPropertyValue("value", false); + } else { + supportEnabled.setPropertyValue("value", true); + supportExtruderNr.setPropertyValue("value", index - 1); + } } } @@ -347,9 +312,22 @@ Item } } + function populateExtruderModel() + { + extruderModel.clear(); + extruderModel.append({ + text: catalog.i18nc("@label", "Don't print support") + }) + for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { + extruderModel.append({ + text: catalog.i18nc("@label", "Print using Extruder %1").arg(extruder + 1) + }) + } + } + Rectangle { id: tipsCell - anchors.top: multiExtrusionCell.visible? multiExtrusionCell.bottom : helpersCellRight.bottom + anchors.top: helpersCell.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left width: parent.width @@ -420,13 +398,4 @@ Item watchedProperties: [ "value" ] storeIndex: 0 } - UM.SettingPropertyProvider - { - id: mainExtruderNr - - containerStackId: Cura.MachineManager.activeMachineId - key: "extruder_nr" - watchedProperties: [ "value" ] - storeIndex: 0 - } } From 098cf515df2b233d3704db052d45ede72bb768ca Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 May 2016 19:02:55 +0200 Subject: [PATCH 02/11] Fix tooltips for simple mode helpers CURA-790 --- resources/qml/SidebarSimple.qml | 22 ++++++++++++++++++++-- resources/themes/cura/styles.qml | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 36d92b6e78..30190c32b2 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -218,7 +218,7 @@ Item onEntered: { parent.hovered_ex = true - base.showTooltip(brimCheckBox, Qt.point(-helpersCellRight.x, 0), + base.showTooltip(brimCheckBox, Qt.point(-brimCheckBox.x, 0), catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards.")); } onExited: @@ -266,7 +266,7 @@ Item onEntered: { parent.hovered_ex = true - base.showTooltip(supportCheckBox, Qt.point(-helpersCellRight.x, 0), + base.showTooltip(supportCheckBox, Qt.point(-supportCheckBox.x, 0), catalog.i18nc("@label", "Enable printing support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); } onExited: @@ -289,6 +289,8 @@ Item width: parent.width/100*45 style: UM.Theme.styles.combobox + property bool hovered_ex: false + currentIndex: supportEnabled.properties.value == "True" ? parseFloat(supportExtruderNr.properties.value) + 1 : 0 onActivated: { if(index==0) { @@ -298,6 +300,22 @@ Item supportExtruderNr.setPropertyValue("value", index - 1); } } + MouseArea { + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.NoButton + onEntered: + { + parent.hovered_ex = true + base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), + catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); + } + onExited: + { + parent.hovered_ex = false + base.hideTooltip(); + } + } } ListModel { diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index cb85abf0c1..b2c2329169 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -286,11 +286,11 @@ QtObject { implicitHeight: UM.Theme.getSize("setting_control").height; implicitWidth: UM.Theme.getSize("setting_control").width; - color: control.hovered ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); + color: (control.hovered || control.hovered_ex) ? Theme.getColor("setting_control_highlight") : Theme.getColor("setting_control"); Behavior on color { ColorAnimation { duration: 50; } } border.width: Theme.getSize("default_lining").width; - border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); + border.color: (control.hovered || control.hovered_ex) ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); } label: Item { Label { From 6a77f67c34bd4e10996f1f9f28ce36aecd7e0d03 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 May 2016 23:27:46 +0200 Subject: [PATCH 03/11] Rearrange sidebar top CURA-340 --- resources/qml/Sidebar.qml | 22 +++++++++++----------- resources/qml/SidebarHeader.qml | 14 +------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 81823f039d..4109fd1586 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -56,22 +56,13 @@ Rectangle configureMachinesAction: base.configureMachinesAction; } - Rectangle { - id: headerSeparator - width: parent.width - height: UM.Theme.getSize("sidebar_lining").height - color: UM.Theme.getColor("sidebar_lining") - anchors.top: header.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - } - ProfileSetup { id: profileItem addProfileAction: base.addProfileAction updateProfileAction: base.updateProfileAction resetProfileAction: base.resetProfileAction manageProfilesAction: base.manageProfilesAction - anchors.top: settingsModeSelection.bottom + anchors.top: header.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width height: totalHeightProfileSetup @@ -80,6 +71,15 @@ Rectangle onHideTooltip: base.hideTooltip() } + Rectangle { + id: headerSeparator + width: parent.width + height: UM.Theme.getSize("sidebar_lining").height + color: UM.Theme.getColor("sidebar_lining") + anchors.top: profileItem.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + } + currentModeIndex: { var index = parseInt(UM.Preferences.getValue("cura/active_mode")) @@ -172,7 +172,7 @@ Rectangle id: sidebarContents anchors.bottom: footerSeparator.top - anchors.top: profileItem.bottom + anchors.top: settingsModeSelection.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: base.left anchors.right: base.right diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index d8bc4291bb..f880485fc5 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -25,23 +25,11 @@ Item color: UM.Theme.getColor("sidebar_header_bar") } - Label{ - id: printjobTabLabel - text: catalog.i18nc("@label:listbox","Print Job"); - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width; - anchors.top: sidebarTabRow.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - width: parent.width/100*45 - font: UM.Theme.getFont("large"); - color: UM.Theme.getColor("text") - } - Rectangle { id: machineSelectionRow width: base.width height: UM.Theme.getSize("sidebar_setup").height - anchors.top: printjobTabLabel.bottom + anchors.top: sidebarTabRow.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter From 85370dad8743b96b5ea5fcf3e99703b81f180cec Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 08:15:53 +0200 Subject: [PATCH 04/11] Fix indent CURA-340 --- resources/qml/SidebarSimple.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 30190c32b2..c828b5d3db 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -322,12 +322,12 @@ Item id: extruderModel Component.onCompleted: populateExtruderModel() } - Connections - { - id: machineChange - target: Cura.MachineManager - onGlobalContainerChanged: populateExtruderModel() - } + Connections + { + id: machineChange + target: Cura.MachineManager + onGlobalContainerChanged: populateExtruderModel() + } } function populateExtruderModel() From f0b956c3c66fcfaf53a6a5e32c59968c72678d1c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 08:21:19 +0200 Subject: [PATCH 05/11] Add selection "tab" for active extruder Only visible for multi-extrusion printers. Doesn't do anything but setting a qml property, but is to be used to change the variant/material per extruder, and to apply a filter to the advanced mode settings. CURA-340 --- resources/qml/SidebarHeader.qml | 93 ++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index f880485fc5..282fa8af25 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -16,6 +16,7 @@ Item property Action configureMachinesAction; UM.I18nCatalog { id: catalog; name:"cura"} property int totalHeightHeader: childrenRect.height + property int currentExtruderIndex; Rectangle { id: sidebarTabRow @@ -87,9 +88,89 @@ Item } Rectangle { - id: variantRow + id: extruderSelection + width: parent.width/100*55 + visible: machineExtruderCount.properties.value > 1 + height: visible ? UM.Theme.getSize("sidebar_header_mode_toggle").height : 0 + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.top: machineSelectionRow.bottom anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 + Component{ + id: wizardDelegate + Button { + height: extruderSelection.height + anchors.left: parent.left + anchors.leftMargin: model.index * (extruderSelection.width / machineExtruderCount.properties.value) + anchors.verticalCenter: parent.verticalCenter + width: parent.width / machineExtruderCount.properties.value + text: model.text + exclusiveGroup: extruderMenuGroup; + checkable: true; + checked: base.currentExtruderIndex == index + onClicked: base.currentExtruderIndex = index + + style: ButtonStyle { + background: Rectangle { + border.width: UM.Theme.getSize("default_lining").width + border.color: control.checked ? UM.Theme.getColor("toggle_checked_border") : + control.pressed ? UM.Theme.getColor("toggle_active_border") : + control.hovered ? UM.Theme.getColor("toggle_hovered_border") : UM.Theme.getColor("toggle_unchecked_border") + color: control.checked ? UM.Theme.getColor("toggle_checked") : + control.pressed ? UM.Theme.getColor("toggle_active") : + control.hovered ? UM.Theme.getColor("toggle_hovered") : UM.Theme.getColor("toggle_unchecked") + Behavior on color { ColorAnimation { duration: 50; } } + Label { + anchors.centerIn: parent + color: control.checked ? UM.Theme.getColor("toggle_checked_text") : + control.pressed ? UM.Theme.getColor("toggle_active_text") : + control.hovered ? UM.Theme.getColor("toggle_hovered_text") : UM.Theme.getColor("toggle_unchecked_text") + font: UM.Theme.getFont("default") + text: control.text; + } + } + label: Item { } + } + } + } + ExclusiveGroup { id: extruderMenuGroup; } + ListView{ + id: extrudersList + property var index: 0 + model: extrudersListModel + delegate: wizardDelegate + anchors.top: parent.top + anchors.left: parent.left + width: parent.width + } + } + + ListModel + { + id: extrudersListModel + Component.onCompleted: populateExtruderModel() + } + Connections + { + id: machineChange + target: Cura.MachineManager + onGlobalContainerChanged: populateExtruderModel() + } + + function populateExtruderModel() + { + extrudersListModel.clear(); + for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { + extrudersListModel.append({ + text: catalog.i18nc("@label", "Extruder %1").arg(extruder + 1) + }) + } + } + + Rectangle { + id: variantRow + anchors.top: extruderSelection.visible ? extruderSelection.bottom : machineSelectionRow.bottom + anchors.topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 width: base.width height: visible ? UM.Theme.getSize("sidebar_setup").height : 0 visible: Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials @@ -214,4 +295,14 @@ Item } } } + + UM.SettingPropertyProvider + { + id: machineExtruderCount + + containerStackId: Cura.MachineManager.activeMachineId + key: "machine_extruder_count" + watchedProperties: [ "value" ] + storeIndex: 0 + } } From f7f9dc036e1a7a51f3cc98819f48ded47bfb22e0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 26 May 2016 08:52:41 +0200 Subject: [PATCH 06/11] Show correct page when opening profile manager CURA-1278 --- resources/qml/Cura.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 6ea69c428b..04ca44369c 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -582,7 +582,7 @@ UM.MainWindow onTriggered: { UM.MachineManager.createProfile(); - preferences.setPage(4); + preferences.setPage(5); preferences.show(); // Show the renameDialog after a very short delay so the preference page has time to initiate @@ -606,7 +606,7 @@ UM.MainWindow onTriggered: { preferences.visible = true; - preferences.setPage(4); + preferences.setPage(5); } } From 5975fa1b0dd2ec35e82f351bdaa18d5015dea608 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 13:29:56 +0200 Subject: [PATCH 07/11] Fix enabled state of setting items Contributes to CURA-1278 --- resources/qml/Settings/SettingView.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 0e99ecc4b7..51f854b519 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -34,11 +34,11 @@ ScrollView id: delegate width: UM.Theme.getSize("sidebar").width; - height: provider.properties.enabled ? UM.Theme.getSize("section").height : 0 + height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : 0 Behavior on height { NumberAnimation { duration: 100 } } - opacity: provider.properties.enabled ? 1 : 0 + opacity: provider.properties.enabled == "True" ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100 } } - enabled: provider.properties.enabled + enabled: provider.properties.enabled == "True" property var definition: model property var settingDefinitionsModel: definitionsModel From d5fa6d884f4cc8d2ed8aed462000c4e3ccb34270 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 13:32:14 +0200 Subject: [PATCH 08/11] Fix XML material profiles so the global properties are properly set Contributes to CURA-339 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 50c39238fd..d73beec193 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -69,13 +69,15 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): self.addMetaDataEntry("properties", property_values) + self.setDefinition(UM.Settings.ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0]) + global_setting_values = {} settings = data.iterfind("./um:settings/um:setting", self.__namespaces) for entry in settings: key = entry.get("key") if key in self.__material_property_setting_map: self.setProperty(self.__material_property_setting_map[key], "value", entry.text, self._definition) - global_setting_values[key] = entry.text + global_setting_values[self.__material_property_setting_map[key]] = entry.text machines = data.iterfind("./um:settings/um:machine", self.__namespaces) for machine in machines: From 8804c2837f67664b0585fb14f044f202f3a80d46 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:28:57 +0200 Subject: [PATCH 09/11] Make reset and restore default buttons work properly again Contributes to CURA-1278 --- resources/qml/Settings/SettingItem.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index ebbf93af84..013dcd1680 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -89,7 +89,7 @@ Item { { id: revertButton; - visible: propertyProvider.properties.state == "InstanceState.User" + visible: propertyProvider.stackLevel == 0 height: parent.height; width: height; @@ -102,8 +102,8 @@ Item { iconSource: UM.Theme.getIcon("reset") onClicked: { - base.resetRequested() - controlContainer.notifyReset(); + revertButton.focus = true + propertyProvider.removeFromContainer(0) } onEntered: base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) @@ -116,14 +116,14 @@ Item { id: inheritButton; //visible: has_profile_value && base.has_inherit_function && base.is_enabled - visible: propertyProvider.properties.state == "InstanceState.User" + visible: propertyProvider.properties.state == "InstanceState.User" && propertyProvider.stackLevel > 0 height: parent.height; width: height; onClicked: { - base.resetToDefaultRequested(); - controlContainer.notifyReset(); + focus = true; + propertyProvider.removeFromContainer(propertyProvider.stackLevel) } backgroundColor: UM.Theme.getColor("setting_control"); From 43ec037c554142b4cf72ef4b49850347cb9ad9f6 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:29:56 +0200 Subject: [PATCH 10/11] Do not load ComboBox items asynchronously Since there is a bug with Qt 5.5 that will do strange reordering. Contributes to CURA-1278 --- resources/qml/Settings/SettingView.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 51f854b519..34b07ce780 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -45,7 +45,9 @@ ScrollView property var propertyProvider: provider //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - asynchronous: QT_VERSION_STR.split(".")[1] >= 5 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting differnt options. So disable asynchronous loading of enum type completely. + asynchronous: model.type != "enum" source: { From 4fc1407c00b3fb709ca59a074565532388520ffd Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 26 May 2016 15:32:08 +0200 Subject: [PATCH 11/11] Update variant profiles to use the right syntax for formulas Contributes to CURA-1278 --- resources/variants/ultimaker2_extended_plus_0.25.inst.cfg | 6 +++--- resources/variants/ultimaker2_extended_plus_0.4.inst.cfg | 6 +++--- resources/variants/ultimaker2_extended_plus_0.6.inst.cfg | 6 +++--- resources/variants/ultimaker2_extended_plus_0.8.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.25.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.4.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.6.inst.cfg | 6 +++--- resources/variants/ultimaker2_plus_0.8.inst.cfg | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg index 0c0154c03b..b499db6163 100644 --- a/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg @@ -12,6 +12,6 @@ machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 0.8 coasting_volume = 0.1 coasting_min_volume = 0.17 -speed_wall = round(speed_print / 1.2, 1) -speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) -speed_topbottom = round(speed_print / 1.5, 1) +speed_wall = =round(speed_print / 1.2, 1) +speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) +speed_topbottom = =round(speed_print / 1.5, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg index 87b74b2572..d2fb6f76b1 100644 --- a/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.4.inst.cfg @@ -10,6 +10,6 @@ type = variant [values] machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 -speed_wall = round(speed_print / 1.25, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2.25, 1) +speed_wall = =round(speed_print / 1.25, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2.25, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg index 343b2d85e5..e4f9f0ce45 100644 --- a/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.6.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.6 machine_nozzle_tip_outer_diameter = 1.25 coasting_volume = 1.36 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg index c1bb4555c1..18570ea75d 100644 --- a/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.8.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.8 machine_nozzle_tip_outer_diameter = 1.35 coasting_volume = 3.22 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_plus_0.25.inst.cfg b/resources/variants/ultimaker2_plus_0.25.inst.cfg index 51a4b44a4a..7cab771101 100644 --- a/resources/variants/ultimaker2_plus_0.25.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.25.inst.cfg @@ -12,6 +12,6 @@ machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 0.8 coasting_volume = 0.1 coasting_min_volume = 0.17 -speed_wall = round(speed_print / 1.2, 1) -speed_wall_0 = 1 if speed_wall < 5 else (speed_wall - 5) -speed_topbottom = round(speed_print / 1.5, 1) +speed_wall = =round(speed_print / 1.2, 1) +speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) +speed_topbottom = =round(speed_print / 1.5, 1) diff --git a/resources/variants/ultimaker2_plus_0.4.inst.cfg b/resources/variants/ultimaker2_plus_0.4.inst.cfg index aaea23a8df..748f367250 100644 --- a/resources/variants/ultimaker2_plus_0.4.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.4.inst.cfg @@ -10,6 +10,6 @@ type = variant [values] machine_nozzle_size = 0.4 machine_nozzle_tip_outer_diameter = 1.05 -speed_wall = round(speed_print / 1.25, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2.25, 1) +speed_wall = =round(speed_print / 1.25, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2.25, 1) diff --git a/resources/variants/ultimaker2_plus_0.6.inst.cfg b/resources/variants/ultimaker2_plus_0.6.inst.cfg index c416b2ec3c..34d0f7a5cf 100644 --- a/resources/variants/ultimaker2_plus_0.6.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.6.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.6 machine_nozzle_tip_outer_diameter = 1.25 coasting_volume = 1.36 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1) diff --git a/resources/variants/ultimaker2_plus_0.8.inst.cfg b/resources/variants/ultimaker2_plus_0.8.inst.cfg index 3b577384ec..e719409060 100644 --- a/resources/variants/ultimaker2_plus_0.8.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.8.inst.cfg @@ -11,6 +11,6 @@ type = variant machine_nozzle_size = 0.8 machine_nozzle_tip_outer_diameter = 1.35 coasting_volume = 3.22 -speed_wall = round(speed_print * 4 / 3, 1) -speed_wall_0 = 1 if speed_wall < 10 else (speed_wall - 10) -speed_topbottom = round(speed_print / 2, 1) +speed_wall = =round(speed_print * 4 / 3, 1) +speed_wall_0 = =1 if speed_wall < 10 else (speed_wall - 10) +speed_topbottom = =round(speed_print / 2, 1)