From 5c99f2442251c09d06c6ac52ba95fa2ec8645c75 Mon Sep 17 00:00:00 2001 From: Jussi Koskela Date: Thu, 2 Jul 2020 15:39:27 +0300 Subject: [PATCH] Fixed incorrect calculation of monitor bounding box (prefix + suffix) gitlab #152 Change-Id: I0a5f2ea2371b053a28aaa3e521910c7a93d18333 --- .../src/org/simantics/diagram/elements/MonitorClass.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/MonitorClass.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/MonitorClass.java index 080f6b9c4..fd1498d0c 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/MonitorClass.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/MonitorClass.java @@ -602,14 +602,14 @@ public class MonitorClass { } TextNode prefixNode = (TextNode) e.getHint(KEY_SG_PREFIX_NODE); if (prefixNode != null) { - Rectangle2D bounds = prefixNode.getBoundsInLocal(); + Rectangle2D bounds = node.parentToLocal(prefixNode.localToParent(prefixNode.getBoundsInLocal())); if (size == null) size = new Rectangle2D.Double(0, 0, 0, 0); size.add(bounds); } TextNode suffixNode = (TextNode) e.getHint(KEY_SG_SUFFIX_NODE); if (suffixNode != null) { - Rectangle2D bounds = suffixNode.getBoundsInLocal(); + Rectangle2D bounds = node.parentToLocal(suffixNode.localToParent(suffixNode.getBoundsInLocal())); if (size == null) size = new Rectangle2D.Double(0, 0, 0, 0); size.add(bounds); -- 2.47.1