File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ public class TableItem extends Item {
4242 boolean checked , grayed , cached ;
4343 int imageIndent , background = -1 , foreground = -1 , font = -1 ;
4444 int [] cellBackground , cellForeground , cellFont ;
45+ /**
46+ * TODO : the index is not valid after a remove is called.
47+ * But updating this field after a remove will degrade performance when the removed item is at the top
48+ */
4549 int index ;
4650 private boolean selected ;
4751 Element check ;
@@ -174,7 +178,7 @@ public void run() {
174178 e .item = TableItem .this ;
175179 e .widget = TableItem .this ;
176180 parent .sendEvent (e );
177- parent .setFocusIndex (index );
181+ parent .setFocusIndex (parent . indexOf ( TableItem . this ) );
178182 toReturn (false );
179183 }
180184 };
You can’t perform that action at this time.
0 commit comments