Summary: | [GTK] Tree.getTopItem often returns the selected item, not the item at the top | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Pascal Muetschard <pmuetschard> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | benken, loskutov |
Version: | 4.15 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Pascal Muetschard
2020-05-15 14:28:08 EDT
Pascal, thanks for detailed bug report. Could you provide a Gerrit patch (looks like you have some ideas hot to fix this bug)? I don't have a setup where I can quickly do this, but I suppose I could try to go through the steps to check-out/modify/build SWT... However, I also don't have a solution, except for just getting rid of the caching and always rely on GTK to compute the top item. I.e. deleting lines 2042-2060 (https://github.com/eclipse/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT/gtk/org/eclipse/swt/widgets/Tree.java#L2042) and then possibly cleaning up the now unused member variables used in the caching. Does that sound reasonable? Looks like I can work around the issue by clearing the selection before calling getTopItem()? I could save the selection and restore it afterwards? |