summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-10-16 11:07:35 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-10-16 20:20:20 +0000
commitfb9b208ae9b22e8ced331f4d4e20392c9bc1357b (patch)
tree455599e9e03ca2c9f61dc0842cf5680e184f4fc6 /src/object
parentExtensions: only check existence for interpreted scripts. (diff)
downloadinkscape-fb9b208ae9b22e8ced331f4d4e20392c9bc1357b.tar.gz
inkscape-fb9b208ae9b22e8ced331f4d4e20392c9bc1357b.zip
Inkscape::XML::Node::addChildAtPos
Diffstat (limited to 'src/object')
-rw-r--r--src/object/sp-item-group.cpp3
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));