mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:45:54 +08:00
Removing object from a group is now possible
CURA-1891
This commit is contained in:
parent
f92f0c52c6
commit
66a64a7a2b
@ -564,13 +564,15 @@ class CuraApplication(QtApplication):
|
|||||||
node = Selection.getSelectedObject(0)
|
node = Selection.getSelectedObject(0)
|
||||||
|
|
||||||
if node:
|
if node:
|
||||||
|
group_node = None
|
||||||
if node.getParent():
|
if node.getParent():
|
||||||
group_node = node.getParent()
|
group_node = node.getParent()
|
||||||
if not group_node.callDecoration("isGroup"):
|
|
||||||
op = RemoveSceneNodeOperation(node)
|
op = RemoveSceneNodeOperation(node)
|
||||||
else:
|
|
||||||
while group_node.getParent().callDecoration("isGroup"):
|
op.push()
|
||||||
group_node = group_node.getParent()
|
if group_node:
|
||||||
|
if len(group_node.getChildren()) == 1:
|
||||||
|
group_node.getChildren()[0].setParent(group_node.getParent())
|
||||||
op = RemoveSceneNodeOperation(group_node)
|
op = RemoveSceneNodeOperation(group_node)
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user