| Summary: | refresh problem in table on windows vista | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Felipe Heidrich <eclipse.felipe> | ||||
| Component: | SWT | Assignee: | Felipe Heidrich <eclipse.felipe> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | a.nusser, Silenio_Quarti | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | 3.7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 316813 | ||||||
| Attachments: |
|
||||||
|
Description
Felipe Heidrich
Test case:
import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class PR316806 {
public static void main(String[] args) {
final Display display = new Display();
Shell shell = new Shell(display);
final Table table = new Table(shell, SWT.BORDER |SWT.MULTI | SWT.FULL_SELECTION);
for (int j = 0; j < 400; j++) {
TableItem item = new TableItem(table, SWT.NONE);
item.setText("item" + j);
}
table.addListener(SWT.KeyDown, new Listener() {
public void handleEvent(Event event) {
if(event.character == SWT.DEL){
int index = table.getSelectionIndex();
if (index != -1) {
table.remove(index);
}
}
}
});
shell.setLayout(new FillLayout());
shell.setSize(200, 600);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
Created attachment 171966 [details]
patch
Patch for this problem and includes the fix for 316813.
Note: Need test on vista and xp for virtual and non virtual table.
Tested on windows 7.
Fixed in HEAD > 20100813 Silenio, I feel this fix might be too dangerous for 3.6.1. I'm fixing it only in HEAD. Agreed ? At least we should wait until the code gets tested. |