From f3eefd7be110ad38acd1e77e5c1647b217b2300c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 8 Sep 2015 11:56:05 +0200 Subject: [PATCH] Delete all now correctly handles grouped objects fixes CURA-111 --- cura/CuraApplication.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 13235d172a..74cf9d8beb 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -297,8 +297,12 @@ class CuraApplication(QtApplication): def deleteAll(self): nodes = [] for node in DepthFirstIterator(self.getController().getScene().getRoot()): - if type(node) is not SceneNode or not node.getMeshData(): + if type(node) is not SceneNode: continue + if not node.getMeshData() and not node.callDecoration("isGroup"): + continue #Node that doesnt have a mesh and is not a group. + if node.getParent() and node.getParent().callDecoration("isGroup"): + continue #Grouped nodes don't need resetting as their parent (the group) is resetted) nodes.append(node) if nodes: op = GroupedOperation()