changeset 1123:5461f36ebaf1

RT-21653: Touch : Embedded : TableView : table header dragging problems.
author jgiles
date Wed, 23 May 2012 12:32:25 +1200
parents 0093b277b701
children e6bbd16b510b
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableColumnHeader.java
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Wed May 23 10:02:30 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Wed May 23 12:32:25 2012 +1200
@@ -356,26 +356,24 @@
     }
     
     private void setSortPos(int sortPos) {
-        if (! isSortingEnabled()) return;
-        
         this.sortPos = sortPos;
         updateSortGrid();
     }
     
     private void updateSortGrid() {
-        // we do not support sorting in embedded devices
-        if (! isSortingEnabled()) return;
-        
         // Fixe for RT-14488
         if (this instanceof NestedTableColumnHeader) return;
         
-        isSortColumn = sortPos != -1;
-        
         getChildren().clear();
         getChildren().add(label);
         
+        // we do not support sorting in embedded devices
+        if (! isSortingEnabled()) return;
+        
         if (! isSortColumn) return;
         
+        isSortColumn = sortPos != -1;
+        
         final int sortColumnCount = getTableView().getSortOrder().size();
         boolean showSortOrderDots = sortPos <= 3 && sortColumnCount > 1;