Browse Source

CURA-4495 Change property name and add default values

Diego Prado Gesto 7 years ago
parent
commit
4a211c6ac6

+ 1 - 0
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml

@@ -145,6 +145,7 @@ Item {
                             property var settingDefinitionsModel: addedSettingsModel
                             property var propertyProvider: provider
                             property var globalPropertyProvider: inheritStackProvider
+                            property var externalResetHandler: false
 
                             //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
                             //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,

+ 2 - 4
resources/qml/Settings/SettingItem.qml

@@ -19,8 +19,6 @@ Item {
     property alias contents: controlContainer.children
     property alias hovered: mouse.containsMouse
 
-    property var resetHandler: false
-
     property var showRevertButton: true
     property var showInheritButton: true
     property var showLinkedSettingIcon: true
@@ -183,8 +181,8 @@ Item {
                 onClicked: {
                     revertButton.focus = true
 
-                    if (resetHandler) {
-                        resetHandler(propertyProvider.key)
+                    if (externalResetHandler) {
+                        externalResetHandler(propertyProvider.key)
                     } else {
                         Cura.MachineManager.clearUserSettingAllCurrentStacks(propertyProvider.key)
                     }

+ 1 - 0
resources/qml/Settings/SettingView.qml

@@ -287,6 +287,7 @@ Item
                 property var settingDefinitionsModel: definitionsModel
                 property var propertyProvider: provider
                 property var globalPropertyProvider: inheritStackProvider
+                property var externalResetHandler: false
 
                 //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
                 //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,