Only remove selectable nodes in deleteAll()

CURA-4795

Otherwise, after loading a project file, all nodes including the
machine will be removed and you don't see the machine any more.
This commit is contained in:
Lipu Fei 2018-01-15 11:12:07 +01:00
parent b60903afc2
commit dc596d0e1e

View file

@ -1045,6 +1045,8 @@ class CuraApplication(QtApplication):
continue
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
continue # Node that doesnt have a mesh and is not a group.
if not node.isSelectable():
continue # Only remove nodes that are selectable.
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)