changeset 1295:8dc0f0d957e0

RT-20840: fx2.2-h17-b01: Adding new column to TableView results in creating new N columns instead of 1
author jgiles
date Wed, 13 Jun 2012 14:20:47 +1200
parents 06a917ba0bfa
children b618eb1ac127
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableColumnHeader.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Wed Jun 13 13:43:08 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableColumnHeader.java	Wed Jun 13 14:20:47 2012 +1200
@@ -246,7 +246,7 @@
     private Label label;
 
     // sort order 
-    private int sortPos;
+    private int sortPos = -1;
     private StackPane arrow;
     private Label sortOrderLabel;
     private HBox sortOrderDots;
@@ -283,6 +283,7 @@
         if (getTableColumn() != null) {
             getTableColumn().visibleProperty().removeListener(weakVisibleListener);
             getTableColumn().widthProperty().removeListener(weakWidthListener);
+            getTableColumn().sortTypeProperty().removeListener(weakSortTypeListener);
         }
         
         sceneProperty().removeListener(sceneListener);