]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/NatTableSelectionAdaptor.java
Fix column width issues on HiDPI displays. KeyTiSelection fixes.
[simantics/platform.git] / bundles / org.simantics.browsing.ui.nattable / src / org / simantics / browsing / ui / nattable / NatTableSelectionAdaptor.java
index 8a37d048b918243cb082bfa483567912ac0a9b31..ec3cb221d0734bc520a6ba62f5bb5c66c1bb6a15 100644 (file)
@@ -107,8 +107,10 @@ public class NatTableSelectionAdaptor implements ISelectionProvider, IPostSelect
        private void setSelectionExternal(List<RowSelectionItem> items) {
                selectionLayer.clear(true);
                for (RowSelectionItem item : items) {
-                       for (int c : item.columnIndex)
-                               selectionLayer.selectCell(c, item.rowIndex, false, true);
+                       for (int c : item.columnIndex) {
+                               int r = selectionLayer.getRowPositionByIndex(item.rowIndex);
+                               selectionLayer.selectCell(c, r, false, true);
+                       }
                }
                selection = new StructuredSelection(items);
                fireEvents();