From 09a9c050ed913423f19d720189e8fe68c0086e8b Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 15 Dec 2022 14:11:27 +0200 Subject: [PATCH] Improved line gaps Fixed multi-gap handling (stored relative coordinate for the next gap, when absolute coordinate was expected). gitlab #888 Change-Id: I8949a389890fcf0423b29c692c580a07fc600928 --- .../diagram/connection/rendering/ConnectionCrossings.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java index 2367805ca..634908884 100644 --- a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java +++ b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java @@ -229,14 +229,15 @@ public class ConnectionCrossings implements PathModifier { path2.lineTo(l.x1 + pos2 * dx, l.y1 + pos2 * dy); } if (pos3 < len) { + pos = pos3; pos3 *= len1; double x = l.x1 + pos3 * dx; double y = l.y1 + pos3 * dy; prevGapEnd = new Point2D.Double(x, y); } else { + pos = pos3; finish = false; } - pos = pos3; } if (finish) { -- 2.47.1