From fb9b208ae9b22e8ced331f4d4e20392c9bc1357b Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Wed, 16 Oct 2019 13:07:35 +0200 Subject: Inkscape::XML::Node::addChildAtPos --- src/object/sp-item-group.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/object/sp-item-group.cpp') 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 &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(doc->getObjectByRepr(repr)); -- cgit v1.2.3