X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fg2d%2FG2DParentNode.java;h=a752e9253eedf1149b1d6860fe8e2586ffdaf539;hb=ff5dddc885c9b3e6e973cfa3eebe9c3d1013c304;hp=de4631e770187c8db2f1a372776a8aea9175797d;hpb=5b16b1d94b0c046803f8b246d32b74f289eca646;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java index de4631e77..a752e9253 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java @@ -349,14 +349,17 @@ public class G2DParentNode extends ParentNode 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(bounds == null) { - bounds = b.getFrame(); - } else { - bounds.add(b); + if(!GeometryUtils.isUndefinedRectangle(b)) { + b = node.localToParent(b); + if(bounds == null) { + bounds = b.getFrame(); + } else { + bounds.add(b); + } } } }