changeset 124:667124e26056

RT-18388: TableView.getSelectionModel().getSelectedItems() duplicates items select with Shift-Click
author jgiles
date Thu, 08 Dec 2011 14:31:33 +1000
parents 0f2c75af06d6
children 6acce1b14ede
files javafx-ui-controls/src/javafx/scene/control/TableView.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/TableView.java	Thu Dec 08 12:25:17 2011 +1000
+++ b/javafx-ui-controls/src/javafx/scene/control/TableView.java	Thu Dec 08 14:31:33 2011 +1000
@@ -1934,7 +1934,10 @@
 //            // if a column is given, I return
 //            if (! isCellSelectionEnabled() && column != null) return;
 
-            TablePosition pos = new TablePosition(getTableView(), row, column);
+            TablePosition pos = isCellSelectionEnabled() ? 
+                    new TablePosition(getTableView(), row, column) :
+                    new TablePosition(getTableView(), row, null);
+            
             if (getSelectionMode() == SelectionMode.SINGLE) {
                 quietClearSelection();
             }