+ /*
+ * In GTK2, when the table is given focus, one table item is
+ * highlighted even if there is no selection. In that case the
+ * highlighted item is the last selected item. Make that last
+ * selected item the top or bottom item depending on if the
+ * out-of-range selection is above or below the visible items.
+ */
+ if (SWT.getPlatform().equals("gtk") && fTableRows > 0) { //$NON-NLS-1$
+ fTable.setRedraw(false);
+ if (start < Integer.MAX_VALUE) {
+ fTable.setSelection(0);
+ } else {
+ fTable.setSelection(fTableRows - 1);
+ fTable.setTopIndex(0);
+ }
+ fTable.setRedraw(true);
+ }