]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementUtils.java
Merge branch 'feature/funcwrite'
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / ElementUtils.java
index 1a12210f0912c23ccc2fbd1ea01fcdcb246a4e4a..74934321739daa9dc59e20ffa0f02a96ab25b65f 100644 (file)
@@ -1162,7 +1162,7 @@ public class ElementUtils {
             // If the previously available node is not a parent of the specified
             // node create a new node under the specified parent and set that
             // as the node of the specified element.
-            if (!node.getParent().equals(withParentNode)) {
+            if (!withParentNode.equals(node.getParent())) {
                 node = nodeId != null ? withParentNode.getOrCreateNode(nodeId, nodeClass) : withParentNode.addNode(nodeClass);
                 forElement.setHint(withNodeKey, node);
                 if (nodeCreationCallback != null)