]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/RouteGraphConnectionClass.java
Fixed two problems in connecting picking
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / elementclass / RouteGraphConnectionClass.java
index bf4577b51e1666378a10b3b6a46e4412b54dab99..5aa435920a3ee2c0ca5ac4e54b4eff8b825fe575 100644 (file)
@@ -198,11 +198,11 @@ public class RouteGraphConnectionClass {
 
         @Override
         public Rectangle2D getBounds(IElement e, Rectangle2D size) {
-            RouteGraph rg = getRouteGraph(e);
-            if (rg != null) {
+            RouteGraphNode rgn = e.getHint(KEY_RG_NODE);
+            if (rgn != null) {
                 if (size == null)
                     size = new Rectangle2D.Double();
-                rg.getBounds(size);
+                size.setRect(rgn.getBoundsInLocal());
             }
             return size;
         }