]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed invalid argument problem from RouteGraphUtils.load 75/2675/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 30 Nov 2018 23:16:34 +0000 (01:16 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 22 Feb 2019 12:09:58 +0000 (12:09 +0000)
Wrong IElement passed to TerminalLayout.getTerminalPosition.

gitlab #220

Change-Id: I46b82ccd8937107a771c1f157cd4581066736abc
(cherry picked from commit ca2230ef8d0b31fabaa114535c0334ece283cb8a)

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);