changeset 297:ed8104fd3efa

RT-19056: SplitPane with CSS makes the JavaFx thread enter in an infinite loop.
author Kinsley Wong <kinsley.wong@oracle.com>
date Fri, 20 Jan 2012 16:59:11 -0800
parents 55346b3feef9
children 1026cc96ab13
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Fri Jan 20 16:07:10 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/SplitPaneSkin.java	Fri Jan 20 16:59:11 2012 -0800
@@ -328,6 +328,7 @@
             return size;
         }
 
+        size = snapSize(size);
         int portion = (int)(size)/available.size();
         int remainder;
 
@@ -380,7 +381,8 @@
         if (available.isEmpty()) {
             return size;
         }
-
+        
+        size = snapSize(size);
         int portion = (int)(size)/available.size();
         int remainder;
 
@@ -984,11 +986,11 @@
         }
 
         @Override protected double computePrefWidth(double height) {
-            return getInsets().getLeft() + getInsets().getRight();
+            return snapSpace(getInsets().getLeft()) + snapSpace(getInsets().getRight());
         }
 
         @Override protected double computePrefHeight(double width) {
-            return getInsets().getTop() + getInsets().getBottom();
+            return snapSpace(getInsets().getTop()) + snapSpace(getInsets().getBottom());
         }
 
         @Override protected double computeMaxWidth(double height) {