X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2FElementUtils.java;h=74934321739daa9dc59e20ffa0f02a96ab25b65f;hb=e3f78a075fb589c0c940f6e13d92a45a39a3ac0f;hp=1a12210f0912c23ccc2fbd1ea01fcdcb246a4e4a;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementUtils.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementUtils.java index 1a12210f0..749343217 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementUtils.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/ElementUtils.java @@ -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)