From bc64d8fa4ed5e2de0fa31a926b4c020ed65fb119 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 20 Mar 2024 13:51:09 +0100 Subject: [PATCH] Fetch support extruder instead of the default. The (main) problem here was that the 'active extruder' was queried for the value, which isn't the same as the support-extruder. CURA-11725 --- .../Recommended/RecommendedSupportSelector.qml | 13 +++++++++++++ resources/qml/Widgets/SingleSettingComboBox.qml | 5 +++-- resources/qml/Widgets/SingleSettingSlider.qml | 3 ++- resources/qml/Widgets/SingleSettingTextField.qml | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 16f1e7cccd..b3249bc5c0 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -34,6 +34,15 @@ RecommendedSettingSection storeIndex: 0 } + UM.SettingPropertyProvider + { + id: supportExtruderProvider + key: "support_extruder_nr" + containerStack: Cura.MachineManager.activeMachine + watchedProperties: [ "value" ] + storeIndex: 0 + } + contents: [ RecommendedSettingItem { @@ -47,6 +56,8 @@ RecommendedSettingSection width: parent.width settingName: "support_structure" propertyRemoveUnusedValue: false + updateAllExtruders: true + defaultExtruderIndex: supportExtruderProvider.properties.value } }, RecommendedSettingItem @@ -75,6 +86,8 @@ RecommendedSettingSection { width: parent.width settingName: "support_type" + updateAllExtruders: true + defaultExtruderIndex: supportExtruderProvider.properties.value } } ] diff --git a/resources/qml/Widgets/SingleSettingComboBox.qml b/resources/qml/Widgets/SingleSettingComboBox.qml index fa150894f8..d917dc2753 100644 --- a/resources/qml/Widgets/SingleSettingComboBox.qml +++ b/resources/qml/Widgets/SingleSettingComboBox.qml @@ -28,7 +28,7 @@ Cura.ComboBox { id: comboboxModel // The propertyProvider has not loaded the setting when this components onComplete triggers. Populating the model - // is defered until propertyProvider signals "onIsValueUsedChanged". The defered upate is triggered with this function. + // is deferred until propertyProvider signals "onIsValueUsedChanged". The deferred update is triggered with this function. function updateModel() { clear() @@ -68,7 +68,8 @@ Cura.ComboBox { { id: propertyProvider containerStackId: updateAllExtruders ? Cura.ExtruderManager.extruderIds[defaultExtruderIndex] : Cura.MachineManager.activeMachine.id - watchedProperties: ["value" , "options"] + removeUnusedValue: false + watchedProperties: ["value", "validationState", "resolve", "options"] } Connections diff --git a/resources/qml/Widgets/SingleSettingSlider.qml b/resources/qml/Widgets/SingleSettingSlider.qml index aac204970e..638688186a 100644 --- a/resources/qml/Widgets/SingleSettingSlider.qml +++ b/resources/qml/Widgets/SingleSettingSlider.qml @@ -34,7 +34,8 @@ UM.Slider { id: propertyProvider containerStackId: updateAllExtruders ? Cura.ExtruderManager.extruderIds[defaultExtruderIndex] : Cura.MachineManager.activeMachine.id - watchedProperties: ["value"] + watchedProperties: ["value", "validationState", "resolve"] + removeUnusedValue: false storeIndex: 0 } diff --git a/resources/qml/Widgets/SingleSettingTextField.qml b/resources/qml/Widgets/SingleSettingTextField.qml index 22c080ebf4..35bd6d1064 100644 --- a/resources/qml/Widgets/SingleSettingTextField.qml +++ b/resources/qml/Widgets/SingleSettingTextField.qml @@ -53,6 +53,7 @@ UM.TextField { id: propertyProvider watchedProperties: ["value", "validationState", "resolve"] + removeUnusedValue: false containerStackId: updateAllExtruders ? Cura.ExtruderManager.extruderIds[defaultExtruderIndex] : Cura.MachineManager.activeMachine.id }