From 14041ebe31fffc5af4f1c2dee859d79b3d8d8efb Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Thu, 23 Mar 2017 09:40:27 -0300 Subject: [PATCH] Draft: Fixed buggy ungroup function --- src/Mod/Draft/Draft.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 71d24a8247..0f401405a4 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -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"