mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:19:02 +08:00
Grouping & ungrouping now has correct selection behaviour
This commit is contained in:
parent
d01279c115
commit
ba612f188a
@ -425,9 +425,15 @@ class CuraApplication(QtApplication):
|
||||
group_decorator = GroupDecorator()
|
||||
group_node.addDecorator(group_decorator)
|
||||
group_node.setParent(self.getController().getScene().getRoot())
|
||||
|
||||
for node in Selection.getAllSelectedObjects():
|
||||
node.setParent(group_node)
|
||||
|
||||
for node in group_node.getChildren():
|
||||
Selection.remove(node)
|
||||
|
||||
Selection.add(group_node)
|
||||
|
||||
@pyqtSlot()
|
||||
def ungroupSelected(self):
|
||||
ungrouped_nodes = []
|
||||
@ -440,6 +446,7 @@ class CuraApplication(QtApplication):
|
||||
|
||||
for child in children_to_move:
|
||||
child.setParent(node.getParent())
|
||||
Selection.add(child)
|
||||
child.callDecoration("setConvexHull",None)
|
||||
node.setParent(None)
|
||||
ungrouped_nodes.append(node)
|
||||
|
Loading…
x
Reference in New Issue
Block a user