changeset 2880:9d2b8b3fca1d

RT-28891: 8.0-controls-scrum-404: Controls.TableView-Sort benchmark is broken
author jgiles
date Tue, 12 Mar 2013 11:14:43 +1300
parents c0cc2ab04805
children 70b66196aea6
files javafx-ui-controls/src/javafx/scene/control/TableView.java
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/TableView.java	Mon Mar 11 14:03:41 2013 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/TableView.java	Tue Mar 12 11:14:43 2013 +1300
@@ -1172,12 +1172,14 @@
         
         // update the Comparator property
         final Comparator<S> oldComparator = getComparator();
-        if (sortOrder.isEmpty()) {
-            setComparator(null);
-        } else {
-            Comparator<S> newComparator = new TableColumnComparator(sortOrder);
-            setComparator(newComparator);
-        }
+        Comparator<S> newComparator = new TableColumnComparator(sortOrder);
+        setComparator(newComparator);
+        
+//        if (sortOrder.isEmpty()) {
+//            // TODO this should eventually handle returning a SortedList back
+//            // to its unsorted state
+//            setComparator(null);
+//        }
         
         // fire the onSort event and check if it is consumed, if
         // so, don't run the sort