changeset 5851:24dda4be6617

RT-34239: TableViewKeyInputTest tests fails in Linux
author jgiles
date Thu, 28 Nov 2013 15:22:57 +1300
parents 022ac7cdcad1
children 24f2584b90eb
files modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehaviorBase.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehaviorBase.java	Thu Nov 28 15:12:18 2013 +1300
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TableViewBehaviorBase.java	Thu Nov 28 15:22:57 2013 +1300
@@ -810,10 +810,12 @@
         TablePositionBase<TC> focusedCell = getFocusedCell();
         int currentRow = focusedCell.getRow();
         int currentColumn = getVisibleLeafIndex(focusedCell.getTableColumn());
-        if (rowDiff < 0 && currentRow == 0) return;
-        else if (rowDiff > 0 && currentRow == getItemCount() - 1) return;
-        else if (columnDiff < 0 && currentColumn == 0) return;
-        else if (columnDiff > 0 && currentColumn == getVisibleLeafColumns().size() - 1) return;
+
+        if (rowDiff < 0 && currentRow <= 0) return;
+        else if (rowDiff > 0 && currentRow >= getItemCount() - 1) return;
+        else if (columnDiff < 0 && currentColumn <= 0) return;
+        else if (columnDiff > 0 && currentColumn >= getVisibleLeafColumns().size() - 1) return;
+        else if (columnDiff > 0 && currentColumn == -1) return;
 
         TableColumnBase tc = focusedCell.getTableColumn();
         tc = getColumn(tc, columnDiff);