]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java
G2DParentNode handles "undefined" child bounds separately
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / G2DParentNode.java
index de4631e770187c8db2f1a372776a8aea9175797d..af8c5630dc84c88c46c350b07c540ee9926e9ae6 100644 (file)
@@ -353,10 +353,12 @@ public class G2DParentNode extends ParentNode<IG2DNode> implements IG2DNode, Ini
             if(b == null && !ignoreNulls)
                 return null;
             if(b != null) {
             if(b == null && !ignoreNulls)
                 return null;
             if(b != null) {
-                if(bounds == null) {
-                    bounds = b.getFrame();
-                } else {
-                    bounds.add(b);
+                if(!GeometryUtils.isUndefinedRectangle(b)) {
+                    if(bounds == null) {
+                        bounds = b.getFrame();
+                    } else {
+                        bounds.add(b);
+                    }
                 }
             }
         }
                 }
             }
         }