diff options
author | alekseisasin <a.sasin@ultimaker.com> | 2017-09-27 12:27:29 +0300 |
---|---|---|
committer | alekseisasin <a.sasin@ultimaker.com> | 2017-09-27 12:27:29 +0300 |
commit | a2e0f4d64fcab35e0eeada795a20b725480013eb (patch) | |
tree | b71e1642e793db6fdea5184fd65fe28c6a0fb23a /cura | |
parent | 052b4b0b1128f900bcbb441714dd8f729d7ebf1e (diff) |
For discard changed window retrieve data from setting "value" property instead of "resolve"
CURA-4358
Diffstat (limited to 'cura')
-rwxr-xr-x | cura/Settings/GlobalStack.py | 5 | ||||
-rw-r--r-- | cura/Settings/UserChangesModel.py | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index bee82e2272..cfab45bfed 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -89,10 +89,11 @@ class GlobalStack(CuraContainerStack): # # \param key The setting key to get the property of. # \param property_name The property to get the value of. + # \param skip_container The container ID to skip. # # \return The value of the property for the specified setting, or None if not found. @override(ContainerStack) - def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> Any: + def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None, skip_container: str = None) -> Any: if not self.definition.findDefinitions(key = key): return None @@ -121,7 +122,7 @@ class GlobalStack(CuraContainerStack): else: Logger.log("e", "Setting {setting} has limit_to_extruder but is not settable per extruder!", setting = key) - result = super().getProperty(key, property_name, context) + result = super().getProperty(key, property_name, context, skip_container) context.popContainer() return result diff --git a/cura/Settings/UserChangesModel.py b/cura/Settings/UserChangesModel.py index 8b61186650..fbbd721f9f 100644 --- a/cura/Settings/UserChangesModel.py +++ b/cura/Settings/UserChangesModel.py @@ -90,9 +90,11 @@ class UserChangesModel(ListModel): for container in containers: if stack == global_stack: - resolve = global_stack.getProperty(setting_key, "resolve") - if resolve is not None: - original_value = resolve + + #Find default value without checking user changed settings. + default_value = global_stack.getProperty(setting_key, "value", skip_container = user_changes.getId()) + if default_value is not None: + original_value = default_value break original_value = container.getProperty(setting_key, "value") |