mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 02:58:59 +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_decorator = GroupDecorator()
|
||||||
group_node.addDecorator(group_decorator)
|
group_node.addDecorator(group_decorator)
|
||||||
group_node.setParent(self.getController().getScene().getRoot())
|
group_node.setParent(self.getController().getScene().getRoot())
|
||||||
|
|
||||||
for node in Selection.getAllSelectedObjects():
|
for node in Selection.getAllSelectedObjects():
|
||||||
node.setParent(group_node)
|
node.setParent(group_node)
|
||||||
|
|
||||||
|
for node in group_node.getChildren():
|
||||||
|
Selection.remove(node)
|
||||||
|
|
||||||
|
Selection.add(group_node)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def ungroupSelected(self):
|
def ungroupSelected(self):
|
||||||
ungrouped_nodes = []
|
ungrouped_nodes = []
|
||||||
@ -440,6 +446,7 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
for child in children_to_move:
|
for child in children_to_move:
|
||||||
child.setParent(node.getParent())
|
child.setParent(node.getParent())
|
||||||
|
Selection.add(child)
|
||||||
child.callDecoration("setConvexHull",None)
|
child.callDecoration("setConvexHull",None)
|
||||||
node.setParent(None)
|
node.setParent(None)
|
||||||
ungrouped_nodes.append(node)
|
ungrouped_nodes.append(node)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user