mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Speed up the objects model
It was using a few expensive calls that had already been cached. CURA-7106
This commit is contained in:
parent
46076bf21d
commit
737a9faa5f
2 changed files with 22 additions and 6 deletions
|
@ -49,6 +49,7 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||
self._is_support_mesh = False
|
||||
self._is_cutting_mesh = False
|
||||
self._is_infill_mesh = False
|
||||
self._is_anti_overhang_mesh = False
|
||||
|
||||
self._stack.propertyChanged.connect(self._onSettingChanged)
|
||||
|
||||
|
@ -126,6 +127,12 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||
def isInfillMesh(self):
|
||||
return self._is_infill_mesh
|
||||
|
||||
def isAntiOverhangMesh(self):
|
||||
return self._is_anti_overhang_mesh
|
||||
|
||||
def _evaluateAntiOverhangMesh(self):
|
||||
return bool(self._stack.userChanges.getProperty("anti_overhang_mesh", "value"))
|
||||
|
||||
def _evaluateIsCuttingMesh(self):
|
||||
return bool(self._stack.userChanges.getProperty("cutting_mesh", "value"))
|
||||
|
||||
|
@ -154,7 +161,9 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||
self._is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
||||
self._is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
||||
|
||||
if setting_key == "support_mesh":
|
||||
if setting_key == "anti_overhang_mesh":
|
||||
self._is_anti_overhang_mesh = self._evaluateAntiOverhangMesh()
|
||||
elif setting_key == "support_mesh":
|
||||
self._is_support_mesh = self._evaluateIsSupportMesh()
|
||||
elif setting_key == "cutting_mesh":
|
||||
self._is_cutting_mesh = self._evaluateIsCuttingMesh()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue