X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fscenegraph%2Fstructural%2FG3DComponentNode.java;h=9ebd8c885a9e47ce8304eb228d4066dd0b2a3605;hb=9f84331c9967c88e0e5550ce91f2b7e364a5cb6d;hp=692913656bde8c3e9c05ea547803dc6c9e2c7736;hpb=da945733caf267fed4cf28206cc99f4f57fbd1e9;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java index 69291365..9ebd8c88 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java +++ b/org.simantics.g3d/src/org/simantics/g3d/scenegraph/structural/G3DComponentNode.java @@ -41,7 +41,7 @@ public abstract class G3DComponentNode, T2 extends IC @RelatedSetValue(Layer0.URIs.HasName) @SetPropertyValue(Layer0.URIs.HasName) public void setName(String name) { - if (name == null) + if (name == null || name.equals(this.name)) return; this.name = name; firePropertyChanged(Layer0.URIs.HasName); @@ -96,8 +96,8 @@ public abstract class G3DComponentNode, T2 extends IC @Override public void addPublishedBy(IStructuralNode node) { - publisher.add(node); - firePropertyChanged(G3D.URIs.publishes); + if (publisher.add(node)) + firePropertyChanged(G3D.URIs.publishes); } @Override