Project: SWT
Bug 90258 Table item not updated when item count == 1
Reported: 2005-04-05 04:56:07 | Status: verified fixed

I20050401 (M6) I am using a Table with SWT.VIRTUAL. Everything works fine, except for the case I set the item count to 1, in which case I do not receive an SWT.SetData notification. Tried to reproduce using a modified version of Snippet151, but everything works as expected there. Do you have any idea what could be going wrong? One funny thing is that in the variable view, the debugger displays the updated contents of table.items[0] after calling clearAll(), but I have verified that the data is never ever set. The display fails to update. My code looks like this: ---------------- Table table... table.setItemCount(1); table.clearAll(); ... private void handleSetData(Event event) { TableItem item= (TableItem) event.item; int index= fProposalTable.indexOf(item); ICompletionProposal current= fFilteredProposals[index]; item.setText(current.getDisplayString()); item.setImage(current.getImage()); item.setData(current); } -----------------

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java