Add Select All functionality

This commit is contained in:
fieldOfView 2016-07-29 19:25:40 +02:00
parent 74d21a9053
commit e01c8a4f10
3 changed files with 31 additions and 1 deletions

View file

@ -633,7 +633,23 @@ class CuraApplication(QtApplication):
if node:
op = SetTransformOperation(node, Vector())
op.push()
## Select all nodes containing mesh data in the scene.
@pyqtSlot()
def selectAll(self):
if not self.getController().getToolsEnabled():
return
Selection.clear()
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
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)
Selection.add(node)
## Delete all nodes containing mesh data in the scene.
@pyqtSlot()
def deleteAll(self):