changeset 230:c2829806d92d

RT-18690: [ListView] page works wrong: step is always of 1 element.
author jgiles
date Mon, 09 Jan 2012 14:58:58 +1300
parents 49a22b095c59
children c411c4c0ba62
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Mon Jan 09 14:49:59 2012 +1300
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Mon Jan 09 14:58:58 2012 +1300
@@ -1605,7 +1605,9 @@
             cell = cells.get(i);
             if (cell.isEmpty()) continue;
 
-            if (cell.getLayoutY() + cell.getHeight() > 0) {
+            if (isVertical() && cell.getLayoutY() + cell.getHeight() > 0) {
+                return cell;
+            } else if (! isVertical() && cell.getLayoutX() + cell.getWidth() > 0) {
                 return cell;
             }
         }