diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-10-16 11:07:35 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-10-16 20:20:20 +0000 |
| commit | fb9b208ae9b22e8ced331f4d4e20392c9bc1357b (patch) | |
| tree | 455599e9e03ca2c9f61dc0842cf5680e184f4fc6 /src/xml/simple-node.cpp | |
| parent | Extensions: only check existence for interpreted scripts. (diff) | |
| download | inkscape-fb9b208ae9b22e8ced331f4d4e20392c9bc1357b.tar.gz inkscape-fb9b208ae9b22e8ced331f4d4e20392c9bc1357b.zip | |
Inkscape::XML::Node::addChildAtPos
Diffstat (limited to 'src/xml/simple-node.cpp')
| -rw-r--r-- | src/xml/simple-node.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp index b628d678a..47f66ff85 100644 --- a/src/xml/simple-node.cpp +++ b/src/xml/simple-node.cpp @@ -773,21 +773,17 @@ void SimpleNode::mergeFrom(Node const *src, gchar const *key, bool extension, bo Node *rch=sp_repr_lookup_child(this, key, id); if (rch && (!extension || rch->equal(child, false))) { rch->mergeFrom(child, key, extension); + continue; } else { if(rch) { removeChild(rch); } - guint pos = child->position(); - rch = child->duplicate(_document); - appendChild(rch); - rch->setPosition(pos); - rch->release(); } - } else { + } + { guint pos = child->position(); Node *rch=child->duplicate(_document); - appendChild(rch); - rch->setPosition(pos); + addChildAtPos(rch, pos); rch->release(); } } |
