]> 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 838eb893e52b392b78a8796adf4e6e10e17fd7cc..0598bba485d6ba22266c47774faeae576f7384f9 100644 (file)
@@ -344,10 +344,12 @@ public class G2DParentNode extends ParentNode<IG2DNode> implements IG2DNode, Ini
             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);
+                    }
                 }
             }
         }