ref #7095 Disable selection propagation for supplemental info columns
authorPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 26 Jan 2018 09:52:39 +0000 (10:52 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 26 Jan 2018 09:52:39 +0000 (10:52 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/CharacterMatrix.java

index 7f5e2c8f4ede3f4bcb8a97780b07e8a1420868b7..d77a024646f2760cc32ff51c3c3d89ec0bb490cd 100644 (file)
@@ -738,16 +738,19 @@ ICdmEntitySessionEnabled{
             public void handleLayerEvent(ILayerEvent event) {
                 if(event instanceof CellSelectionEvent){
                     CellSelectionEvent cellSelectionEvent = (CellSelectionEvent)event;
-                    Collection<ILayerCell> selectedCells = cellSelectionEvent.getSelectionLayer().getSelectedCells();
-                    StructuredSelection selection = new StructuredSelection();
-                    if(selectedCells.size()==1){
-                        ILayerCell cell = selectedCells.iterator().next();
-                        Object dataValue = cell.getDataValue();
-                        if(dataValue!=null){
-                            selection = new StructuredSelection(dataValue);
+                    int columnPosition = cellSelectionEvent.getColumnPosition();
+                    if(columnPosition>LEADING_COLUMN_COUNT){
+                        Collection<ILayerCell> selectedCells = cellSelectionEvent.getSelectionLayer().getSelectedCells();
+                        StructuredSelection selection = new StructuredSelection();
+                        if(selectedCells.size()==1){
+                            ILayerCell cell = selectedCells.iterator().next();
+                            Object dataValue = cell.getDataValue();
+                            if(dataValue!=null){
+                                selection = new StructuredSelection(dataValue);
+                            }
                         }
+                        selService.setSelection(selection);
                     }
-                    selService.setSelection(selection);
                 }
             }
         });