]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed invalid argument problem from RouteGraphUtils.load 13/2513/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 30 Nov 2018 23:16:34 +0000 (01:16 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 30 Nov 2018 23:16:34 +0000 (01:16 +0200)
Wrong IElement passed to TerminalLayout.getTerminalPosition.

gitlab #220

Change-Id: I46b82ccd8937107a771c1f157cd4581066736abc

bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java

index 62c4046151e875fdda0e13715a5aa619c9afae36..17ccbe351e0941380bf0b2db94ef9a6a34fc1f96 100644 (file)
@@ -302,7 +302,7 @@ public class RouteGraphUtils {
 
             final ResourceTerminal rt = new ResourceTerminal(terminal);
             final TerminalLayout tl = te.getElementClass().getSingleItem(TerminalLayout.class);
-            AffineTransform terminalPos = tl.getTerminalPosition(element, rt);
+            AffineTransform terminalPos = tl.getTerminalPosition(te, rt);
 
             if (terminalPos != null) {
                 terminalTr.concatenate(terminalPos);