Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-08-14 14:41:20 +0300
committerJaime van Kessel <nallath@gmail.com>2020-08-14 14:41:20 +0300
commit9a0264644b870b96720e98318f0702ffcc5b31d4 (patch)
treeb63919296f6cec539fd1faa50be81529c7f4b5d6
parent1374c2faa93d83b9add7e414272facd993f7e572 (diff)
Simplify the _shouldResolve function
This increases the speed of the setting resolvement.
-rwxr-xr-xcura/Settings/GlobalStack.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py
index a9164d0fb9..a254104c5b 100755
--- a/cura/Settings/GlobalStack.py
+++ b/cura/Settings/GlobalStack.py
@@ -256,8 +256,6 @@ class GlobalStack(CuraContainerStack):
raise Exceptions.InvalidOperationError("Global stack cannot have a next stack!")
- # protected:
-
# Determine whether or not we should try to get the "resolve" property instead of the
# requested property.
def _shouldResolve(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> bool:
@@ -273,10 +271,8 @@ class GlobalStack(CuraContainerStack):
# track all settings that are being resolved.
return False
- setting_state = super().getProperty(key, "state", context = context)
- if setting_state is not None and setting_state != InstanceState.Default:
- # When the user has explicitly set a value, we should ignore any resolve and
- # just return that value.
+ if self.hasUserValue(key):
+ # When the user has explicitly set a value, we should ignore any resolve and just return that value.
return False
return True