changeset 6177:effd2a3411c7

Slight tweaks to previous changeset for RT-35141, proposed by Scott Palmer.
author jgiles
date Thu, 23 Jan 2014 14:36:14 +1300
parents 094806dabd94
children 641f78393ffc
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Thu Jan 23 11:28:34 2014 -0800
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Thu Jan 23 14:36:14 2014 +1300
@@ -685,14 +685,14 @@
         }
         // --- end of RT-35141 fix
 
-        if (newColumnPos == currentPos) return;
-
         if (newColumnPos >= columnsCount) {
-            newColumnPos = columns.size() - 1;
+            newColumnPos = columnsCount - 1;
         } else if (newColumnPos < 0) {
             newColumnPos = 0;
         }
 
+        if (newColumnPos == currentPos) return;
+
         List<TableColumnBase> tempList = new ArrayList<>(columns);
         tempList.remove(column);
         tempList.add(newColumnPos, column);