changeset 3990:8ef86a48a6c0

RT-30316: Control didn't respect Node's setManaged flag
author jgiles
date Thu, 13 Jun 2013 13:49:29 +1200
parents 544f08907253
children 0c7ce9e94f64
files javafx-ui-controls/src/javafx/scene/control/SkinBase.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/SkinBase.java	Thu Jun 13 11:10:33 2013 +1200
+++ b/javafx-ui-controls/src/javafx/scene/control/SkinBase.java	Thu Jun 13 13:49:29 2013 +1200
@@ -169,10 +169,12 @@
      */
     protected void layoutChildren(final double contentX, final double contentY,
             final double contentWidth, final double contentHeight) {
-        // By default simply sizes all children to fit within the space provided
+        // By default simply sizes all managed children to fit within the space provided
         for (int i=0, max=children.size(); i<max; i++) {
             Node child = children.get(i);
-            layoutInArea(child, contentX, contentY, contentWidth, contentHeight, -1, HPos.CENTER, VPos.CENTER);
+            if (child.isManaged()) {
+                layoutInArea(child, contentX, contentY, contentWidth, contentHeight, -1, HPos.CENTER, VPos.CENTER);
+            }
         }
     }