Ungroupning with nested groups now works correctly

This commit is contained in:
Jaime van Kessel 2015-07-15 17:22:33 +02:00
parent 49cb12bda1
commit cc2f0fc009

View File

@ -437,11 +437,12 @@ class CuraApplication(QtApplication):
@pyqtSlot() @pyqtSlot()
def ungroupSelected(self): def ungroupSelected(self):
ungrouped_nodes = [] ungrouped_nodes = []
for node in Selection.getAllSelectedObjects(): selected_objects = Selection.getAllSelectedObjects()[:] #clone the list
for node in selected_objects:
if node.callDecoration("isGroup" ): if node.callDecoration("isGroup" ):
children_to_move = [] children_to_move = []
for child in node.getChildren(): for child in node.getChildren():
if child.getMeshData() is not None: if type(child) is SceneNode:
children_to_move.append(child) children_to_move.append(child)
for child in children_to_move: for child in children_to_move: