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
path: root/cura/UI
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2019-05-23 17:09:22 +0300
committerJaime van Kessel <nallath@gmail.com>2019-05-23 17:09:22 +0300
commit502eea4d26ee508e498a86b391235c6ce92a6307 (patch)
treeaebb1226d9a32542ac2b43e9be9d6e51f551b2d6 /cura/UI
parent71d156b175b278194abd9835e8b9e0431e9132ed (diff)
Simplify the objects model further
CUA-6283
Diffstat (limited to 'cura/UI')
-rw-r--r--cura/UI/ObjectsModel.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/cura/UI/ObjectsModel.py b/cura/UI/ObjectsModel.py
index 9c6891aa41..3b38e3b458 100644
--- a/cura/UI/ObjectsModel.py
+++ b/cura/UI/ObjectsModel.py
@@ -84,19 +84,18 @@ class ObjectsModel(ListModel):
group_name_prefix = group_name_template.split("#")[0]
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()): # type: ignore
- if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
+ is_group = bool(node.callDecoration("isGroup"))
+ if not node.callDecoration("isSliceable") and not is_group:
continue
-
+
parent = node.getParent()
if parent and parent.callDecoration("isGroup"):
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
- if not node.callDecoration("isSliceable") and not node.callDecoration("isGroup"):
- continue
+
node_build_plate_number = node.callDecoration("getBuildPlateNumber")
if filter_current_build_plate and node_build_plate_number != active_build_plate_number:
continue
- is_group = bool(node.callDecoration("isGroup"))
force_rename = False
if not is_group:
# Handle names for individual nodes