From 339b65b1a02890ff07daedf9091a81e8f9737d10 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Mon, 25 Feb 2008 10:11:26 +0000 Subject: fix converting 3d boxes to path and ungrouping - do not lose selection, preserve style, id and clip/mask (bzr r4849) --- src/sp-item-group.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/sp-item-group.cpp') diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index ac7aee1d4..5ae5713ca 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -329,11 +329,13 @@ sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done) SPItem *pitem = SP_ITEM (SP_OBJECT_PARENT (gitem)); Inkscape::XML::Node *prepr = SP_OBJECT_REPR (pitem); - if (SP_IS_BOX3D(gitem)) { - group = box3d_convert_to_group(SP_BOX3D(gitem)); - gitem = SP_ITEM(group); - grepr = SP_OBJECT_REPR(gitem); - } + if (SP_IS_BOX3D(gitem)) { + grepr = box3d_convert_to_group(SP_BOX3D(gitem)); + if (grepr) { + gitem = SP_ITEM(doc->getObjectByRepr(grepr)); + group = SP_GROUP(gitem); + } + } /* Step 1 - generate lists of children objects */ GSList *items = NULL; -- cgit v1.2.3