diff options
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(); } } |
