| Summary: | [GTK] Table.setHeaderVisible and setColumnOrder do not respect setRedraw(false) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Grant Gayed <grant_gayed> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | akurtakov, billy.biggs, cocoakevin, ericwill |
| Version: | 4.7 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-GTK | ||
| Whiteboard: | |||
This is reproducible, not sure how important it is but still reproducible. Assigning to Ian. Hi, setRedraw() is a hint operation that does not fully support all widgets, which is causing the issue we see here. The note about this can be seen here: http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fwidgets%2FControl.html Reset to default assignee and move out of 4.7. Not going to fix this as it isn't feasible in GTK and IMO isn't really a big issue. Control.setRedraw() is a hint anyways. As for cheese -- I think that fixed elsewhere because I don't see it here. |
3.1RC1 - run the snippet below (demonstrates the setHeaderVisible case) - click on the shell and Table.setRedraw(false) is invoked - click on the shell again and Table.setHeaderVisible(false) is invoked. This hides the header and copies item cheese to where it was. It seems like this should do nothing because of the previous setRedraw(false) - click on the shell again and Table.setRedraw(true) is invoked: now things seem right again - to see the Table.setColumnOrder case just uncomment the line in the MouseDown listener and comment out the setHeaderVisible line above it public class Main { static int counter = 0; public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setBounds(10, 10, 300, 300); final Table table = new Table(shell, SWT.NONE); table.setHeaderVisible(true); table.setBounds(10, 10, 200, 200); TableColumn column = new TableColumn(table, SWT.NONE); column.setText("0"); column.setWidth(75); column = new TableColumn(table,SWT.CENTER); column.setText("1"); column.setWidth(120); new TableItem(table, SWT.NONE).setText(new String[] {"abc","def"}); shell.addListener(SWT.MouseDown, new Listener() { public void handleEvent(Event event) { if (counter == 0) { System.out.println("setRedraw(false)"); table.setRedraw(false); counter++; return; } if (counter == 1) { System.out.println("setHeaderVisible(true): overwrites item"); table.setHeaderVisible(false); //table.setColumnOrder(new int[] {1,0}); counter++; return; } if (counter == 2) { System.out.println("setRedraw(true), item reappears"); table.setRedraw(true); counter++; return; } System.out.println("nothing left to do"); } }); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }