changeset 4143:2bbd2f1c93c9

RT-30930: CSS: After adding in another thread, DatePicker doesn't have normal size.
author jgiles
date Wed, 03 Jul 2013 15:15:57 +1200
parents 2da2330e4ea7
children 2dfd53d0965c
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java	Wed Jul 03 14:59:54 2013 +1200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxBaseSkin.java	Wed Jul 03 15:15:57 2013 +1200
@@ -132,6 +132,13 @@
         displayNode = getDisplayNode();
         if (displayNode != null && !children.contains(displayNode)) {
             children.add(displayNode);
+
+            // RT-20575: The display node is being brought into the scenegraph
+            // early so we get the correct prefHeight, but at this point it
+            // may not have had a layout pass run over it itself, so the
+            // displayNode will return a prefHeight of 0. Here we are forcing
+            // a one-off run of the layout over the displayNode.
+            displayNode.impl_processCSS(true);
         }
     }
     
@@ -181,13 +188,6 @@
     @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
         if (displayNode == null) {
             updateDisplayArea();
-            
-            // RT-20575: The display node is being brought into the scenegraph
-            // early so we get the correct prefHeight, but at this point it
-            // may not have had a layout pass run over it itself, so the 
-            // displayNode will return a prefHeight of 0. Here we are forcing
-            // a one-off run of the layout over the displayNode.
-            displayNode.impl_processCSS(true);
         }
 
         double ph;