changeset 6221:20396f6a7fac

RT-34897: [ListView] ListView not downsizing cells when its breadth shrinks
author jgiles
date Wed, 29 Jan 2014 14:54:50 +1300
parents 232c156edd82
children a874c214a9c7
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Thu Jan 30 16:32:20 2014 -0500
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Wed Jan 29 14:54:50 2014 +1300
@@ -982,6 +982,14 @@
             }
         }
 
+        // once per layout we reset the maximum pref breadth to -1 to allow for
+        // it to be recalculated. This is particularly useful when dealing with
+        // issues related to the control growing / shrinking in width and not
+        // correctly resizing cells (as the maxPrefBreadth was larger than the
+        // viewportBreadth when compared in fitCells()).
+        // The issue that resulted in this line being added was RT-34897.
+        setMaxPrefBreadth(-1);
+
 //        layingOut = true;
 
         /*