Propagate ignoreNulls parameter recursively in bounds calculation
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / nodes / LinkNode.java
index 50d50ecd2f3fe48e2d8b9f894149c7585880bd13..aa570d6aa21144d3ea4dfd6eb9f2dd7d255de93e 100644 (file)
@@ -131,6 +131,11 @@ public class LinkNode extends StateMaskNode {
 
     @Override
     public Rectangle2D getBoundsInLocal() {
+        return getBoundsInLocal(false);
+    }
+    
+    @Override
+    public Rectangle2D getBoundsInLocal(boolean ignoreNulls) {
         // Safety against cyclic cases.
         if (hasFlags(IN_GET_BOUNDS))
             return new Rectangle2D.Double();
@@ -141,7 +146,7 @@ public class LinkNode extends StateMaskNode {
 
         setFlags(IN_GET_BOUNDS);
         try {
-            Rectangle2D bounds = n.getBoundsInLocal();
+            Rectangle2D bounds = n.getBoundsInLocal(ignoreNulls);
             if (transform != null && !transform.isIdentity())
                 bounds = transform.createTransformedShape(bounds).getBounds2D();
             return bounds;