From: lempinen Date: Fri, 11 Jan 2013 10:42:09 +0000 (+0000) Subject: Dependency node is a text node and it requires a string as text. Updated the string... X-Git-Tag: simantics-1.10.1~82 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=6204228bc7d22c35723bfefb40fac040bc3bafa4;p=simantics%2Fsysdyn.git Dependency node is a text node and it requires a string as text. Updated the string to be empty instead of null, if polarity has not been set. (fixes #3975) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26598 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java index 9e790aa4..372820ac 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/connections/DependencyEdgeClass.java @@ -130,8 +130,8 @@ public class DependencyEdgeClass { else location = (String) polarityLocationPair.second; - if(polarityPair != null) - node.init((String) polarityPair.second, location, font, color, 0, 0, 0.235); + String text = polarityPair != null ? (String) polarityPair.second : ""; + node.init(text, location, font, color, 0, 0, 0.235); update(e); }