diff options
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/sp-item-group.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/object/sp-item-group.cpp b/src/object/sp-item-group.cpp index 77608d4cb..be09e4227 100644 --- a/src/object/sp-item-group.cpp +++ b/src/object/sp-item-group.cpp @@ -625,10 +625,9 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d for (auto i=items.rbegin();i!=items.rend();++i) { Inkscape::XML::Node *repr = *i; // add item - prepr->appendChild(repr); // restore position; since the items list was prepended (i.e. reverse), we now add // all children at the same pos, which inverts the order once again - repr->setPosition(pos > 0 ? pos : 0); + prepr->addChildAtPos(repr, pos); // fill in the children list if non-null SPItem *item = static_cast<SPItem *>(doc->getObjectByRepr(repr)); |
