Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
fix Node::setChildNodes
stuffins lastname7e99c06256a0
diff --git a/libs/libkis/Node.cpp b/libs/libkis/Node.cppindex d0165fc338..b1c1078da2 100644--- a/libs/libkis/Node.cpp+++ b/libs/libkis/Node.cpp@@ -289,10 +289,8 @@ bool Node::removeChildNode(Node *child)void Node::setChildNodes(QList<Node*> nodes){if (!d->node) return;- KisNodeSP node = d->node->firstChild();- while (node) {- d->image->removeNode(node);- node = node->nextSibling();+ while (d->node->firstChild()) {+ d->image->removeNode(d->node->firstChild());}Q_FOREACH(Node *node, nodes) {d->image->addNode(node->node(), d->node);