Draft: Fixed buggy ungroup function

This commit is contained in:
Yorik van Havre
2017-03-23 09:40:27 -03:00
parent b5e2df3133
commit 14041ebe31

View File

@@ -244,8 +244,10 @@ def ungroup(obj):
"removes the current object from any group it belongs to"
for g in getGroupNames():
grp = FreeCAD.ActiveDocument.getObject(g)
if grp.hasObject(obj):
grp.removeObject(obj)
if obj in grp.Group:
g = grp.Group
g.remove(obj)
grp.Group = g
def autogroup(obj):
"adds a given object to the autogroup, if applicable"