From a8f7e8636cac55aef8200bae929f6441402c61c3 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Thu, 28 Sep 2023 16:43:24 +0200 Subject: [PATCH 1/3] CURA-10967 set property value updated to take into account if resolve is present or not. --- .../Recommended/RecommendedSupportSelector.qml | 2 ++ resources/qml/Widgets/SingleSettingComboBox.qml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 44b3d28e24..ef12bb81e6 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -43,6 +43,7 @@ RecommendedSettingSection settingControl: Cura.SingleSettingComboBox { + id:support width: parent.width settingName: "support_structure" } @@ -60,6 +61,7 @@ RecommendedSettingSection settingControl: Cura.SingleSettingExtruderSelectorBar { extruderSettingName: "support_extruder_nr" + onSelectedIndexChanged: support.forceUpdateSettings() } }, RecommendedSettingItem diff --git a/resources/qml/Widgets/SingleSettingComboBox.qml b/resources/qml/Widgets/SingleSettingComboBox.qml index 1b7101e9e7..f6790c75b5 100644 --- a/resources/qml/Widgets/SingleSettingComboBox.qml +++ b/resources/qml/Widgets/SingleSettingComboBox.qml @@ -87,6 +87,11 @@ Cura.ComboBox { } } + function forceUpdateSettings() + { + comboboxModel.updateModel(); + propertyProvider.setPropertyValue("value", comboboxModel.get(currentIndex).code , skip_resolve =true) + } function updateSetting(value) { From 35528202b6605c5ac4f85ae2b652dc5ee2415e5c Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Fri, 29 Sep 2023 14:44:34 +0200 Subject: [PATCH 2/3] Fixes to improve update all extruder setting CURA-10967 --- .../Recommended/RecommendedSupportSelector.qml | 1 + resources/qml/Widgets/SingleSettingComboBox.qml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index ef12bb81e6..f1b9682c82 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -23,6 +23,7 @@ RecommendedSettingSection function onEnableSectionChanged(state) { supportEnabled.setPropertyValue("value", state) + support.updateAllExtruders = true } property UM.SettingPropertyProvider supportEnabled: UM.SettingPropertyProvider diff --git a/resources/qml/Widgets/SingleSettingComboBox.qml b/resources/qml/Widgets/SingleSettingComboBox.qml index f6790c75b5..4f516db751 100644 --- a/resources/qml/Widgets/SingleSettingComboBox.qml +++ b/resources/qml/Widgets/SingleSettingComboBox.qml @@ -89,8 +89,9 @@ Cura.ComboBox { } function forceUpdateSettings() { + updateAllExtruders = false comboboxModel.updateModel(); - propertyProvider.setPropertyValue("value", comboboxModel.get(currentIndex).code , skip_resolve =true) + propertyProvider.setPropertyValueForce("value", comboboxModel.get(currentIndex).code) } function updateSetting(value) @@ -101,7 +102,7 @@ Cura.ComboBox { } else { - propertyProvider.setPropertyValue("value", value) + propertyProvider.setPropertyValueForce("value", value) } } } From ebf58aa97277b02a180fa815f5e9ba19f6ecaec6 Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Thu, 5 Oct 2023 11:42:28 +0200 Subject: [PATCH 3/3] propertyvalue update was not successful because of _remove_unused_value in propertyProvider CURA-10967 --- .../Recommended/RecommendedSupportSelector.qml | 2 +- resources/qml/Widgets/SingleSettingComboBox.qml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index f1b9682c82..16f1e7cccd 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -23,7 +23,6 @@ RecommendedSettingSection function onEnableSectionChanged(state) { supportEnabled.setPropertyValue("value", state) - support.updateAllExtruders = true } property UM.SettingPropertyProvider supportEnabled: UM.SettingPropertyProvider @@ -47,6 +46,7 @@ RecommendedSettingSection id:support width: parent.width settingName: "support_structure" + propertyRemoveUnusedValue: false } }, RecommendedSettingItem diff --git a/resources/qml/Widgets/SingleSettingComboBox.qml b/resources/qml/Widgets/SingleSettingComboBox.qml index 4f516db751..fa150894f8 100644 --- a/resources/qml/Widgets/SingleSettingComboBox.qml +++ b/resources/qml/Widgets/SingleSettingComboBox.qml @@ -15,6 +15,7 @@ import Cura 1.7 as Cura Cura.ComboBox { textRole: "text" property alias settingName: propertyProvider.key + property alias propertyRemoveUnusedValue: propertyProvider.removeUnusedValue // If true, all extruders will have "settingName" property updated. // The displayed value will be read from the extruder with index "defaultExtruderIndex" instead of the machine. @@ -89,9 +90,7 @@ Cura.ComboBox { } function forceUpdateSettings() { - updateAllExtruders = false comboboxModel.updateModel(); - propertyProvider.setPropertyValueForce("value", comboboxModel.get(currentIndex).code) } function updateSetting(value) @@ -102,7 +101,7 @@ Cura.ComboBox { } else { - propertyProvider.setPropertyValueForce("value", value) + propertyProvider.setPropertyValue("value", value) } } }