From: Tuukka Lehtonen Date: Fri, 30 Nov 2018 23:16:34 +0000 (+0200) Subject: Fixed invalid argument problem from RouteGraphUtils.load X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F2675%2F1;p=simantics%2Fplatform.git Fixed invalid argument problem from RouteGraphUtils.load Wrong IElement passed to TerminalLayout.getTerminalPosition. gitlab #220 Change-Id: I46b82ccd8937107a771c1f157cd4581066736abc (cherry picked from commit ca2230ef8d0b31fabaa114535c0334ece283cb8a) --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java index 62c404615..17ccbe351 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java @@ -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);