changeset 5559:f66ed6275113

RT-31653: TableView : resize column broken
author jgiles
date Tue, 29 Oct 2013 17:49:28 +1300
parents 17a35fcb4070
children ca4ad7f14aeb
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Tue Oct 29 16:59:35 2013 +1300
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Tue Oct 29 17:49:28 2013 +1300
@@ -1455,7 +1455,8 @@
             // There was a weird bug where the newMax would sometimes go < 0
             // when switching vertical and that would drive the min value to
             // something crazy negative.
-            double newMax = Math.max(1, getMaxPrefBreadth() - viewportBreadth);
+            // Math.abs(..) used here to resolve RT-31653
+            double newMax = Math.max(1, Math.abs(getMaxPrefBreadth() - viewportBreadth));
             if (newMax != breadthBar.getMax()) {
                 breadthBar.setMax(newMax);