]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java
Propagate ignoreNulls parameter recursively in bounds calculation
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / G2DParentNode.java
index af8c5630dc84c88c46c350b07c540ee9926e9ae6..a752e9253eedf1149b1d6860fe8e2586ffdaf539 100644 (file)
@@ -349,11 +349,12 @@ public class G2DParentNode extends ParentNode<IG2DNode> implements IG2DNode, Ini
         Rectangle2D bounds = null;
         while(it.hasNext()) {
             IG2DNode node = it.next();
-            Rectangle2D b = node.getBounds();
+            Rectangle2D b = node.getBoundsInLocal(ignoreNulls);
             if(b == null && !ignoreNulls)
                 return null;
             if(b != null) {
                 if(!GeometryUtils.isUndefinedRectangle(b)) {
+                    b = node.localToParent(b);
                     if(bounds == null) {
                         bounds = b.getFrame();
                     } else {