summaryrefslogtreecommitdiffstats
path: root/src/sp-item-group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-item-group.cpp')
-rw-r--r--src/sp-item-group.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index 9bd42665d..72cd5d7fa 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -375,7 +375,7 @@ void sp_item_group_ungroup_handle_clones(SPItem *parent, Geom::Affine const g)
{
for(std::list<SPObject*>::const_iterator refd=parent->hrefList.begin();refd!=parent->hrefList.end();refd++){
SPItem *citem = dynamic_cast<SPItem *>(*refd);
- if (citem) {
+ if (citem && !citem->cloned) {
SPUse *useitem = dynamic_cast<SPUse *>(citem);
if (useitem && useitem->get_original() == parent) {
Geom::Affine ctrans;
@@ -541,15 +541,12 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d
if (item) {
item->doWriteTransform(repr, item->transform, NULL, false);
+ children.insert(children.begin(),item);
} else {
g_assert_not_reached();
}
Inkscape::GC::release(repr);
- if (!children.empty() && item) {
- children.insert(children.begin(),item);
- }
-
items = g_slist_remove (items, items->data);
}