From e02a2538ec72f8d8aaaab5f62b5fb57da9ca1cdc Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Wed, 9 Jan 2008 02:40:03 +0000 Subject: Convert 3D boxes to ordinary groups before tweaking, ungrouping or applying 'convert to path' (closes LP #179693 and #176646). (bzr r4439) --- src/sp-item-group.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/sp-item-group.cpp') diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 4fc1608cf..aafd48966 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -36,7 +36,6 @@ #include "sp-mask.h" #include "sp-path.h" #include "box3d.h" -#include "box3d-side.h" static void sp_group_class_init (SPGroupClass *klass); static void sp_group_init (SPGroup *group); @@ -328,6 +327,12 @@ 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); + } + /* Step 1 - generate lists of children objects */ GSList *items = NULL; GSList *objects = NULL; @@ -337,13 +342,6 @@ sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done) SPItem *citem = SP_ITEM (child); - if (SP_IS_BOX3D_SIDE(child)) { - Inkscape::XML::Node *repr = SP_OBJECT_REPR(child); - // FIXME: This doesn't remove the attribute "inkscape:box3dsidetype". Why? - repr->setAttribute("inkscape:box3dsidetype", NULL); - repr->setAttribute("sodipodi:type", NULL); - } - /* Merging of style */ // this converts the gradient/pattern fill/stroke, if any, to userSpaceOnUse; we need to do // it here _before_ the new transform is set, so as to use the pre-transform bbox -- cgit v1.2.3