Revision 84a21bc7
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/CharacterMatrix.java | ||
---|---|---|
34 | 34 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
35 | 35 |
import org.eclipse.e4.ui.workbench.modeling.ESelectionService; |
36 | 36 |
import org.eclipse.jface.layout.GridDataFactory; |
37 |
import org.eclipse.jface.viewers.StructuredSelection; |
|
37 | 38 |
import org.eclipse.nebula.widgets.nattable.NatTable; |
38 | 39 |
import org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration; |
39 | 40 |
import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes; |
... | ... | |
348 | 349 |
if(event instanceof CellSelectionEvent){ |
349 | 350 |
CellSelectionEvent cellSelectionEvent = (CellSelectionEvent)event; |
350 | 351 |
Collection<ILayerCell> selectedCells = cellSelectionEvent.getSelectionLayer().getSelectedCells(); |
352 |
StructuredSelection selection = new StructuredSelection(); |
|
351 | 353 |
if(selectedCells.size()==1){ |
352 | 354 |
ILayerCell cell = selectedCells.iterator().next(); |
353 |
selService.setSelection(cell.getDataValue());
|
|
355 |
selection = new StructuredSelection(cell.getDataValue());
|
|
354 | 356 |
} |
357 |
selService.setSelection(selection); |
|
355 | 358 |
} |
356 | 359 |
} |
357 | 360 |
}); |
Also available in: Unified diff
ref #7095 Fire empty selection for multiple selected cells