changeset 1290:2f475847df17

RT-22415: Adding an item to SplitPane may hang FX
author Kinsley Wong
date Tue, 12 Jun 2012 17:46:34 -0700
parents 9d72813b0448
children e6d1c213886d
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Tue Jun 12 16:49:19 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Tue Jun 12 17:46:34 2012 -0700
@@ -357,7 +357,7 @@
                     c.setAvailable(c.getArea() - min);
                     size -= portion;
                 }
-                if (size == 0) {
+                if ((int)size == 0) {
                     return size;
                 }
             }
@@ -402,7 +402,7 @@
                     c.setAvailable(c.getAvailable() - portion);
                     size -= portion;
                 }
-                if (size == 0) {
+                if ((int)size == 0) {
                     return size;
                 }
             }
@@ -1102,11 +1102,11 @@
         }
 
         @Override protected double computeMaxWidth(double height) {
-            return content.maxWidth(height);
+            return snapSize(content.maxWidth(height));
         }
 
         @Override protected double computeMaxHeight(double width) {
-            return content.maxHeight(width);
+            return snapSize(content.maxHeight(width));
         }
     }
 }