| Summary: | [Cocoa] Tree: inconsistent selection problem when collapsing parent node | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <eclipse> | ||||||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | lshanmug, ts-swt | ||||||||||
| Version: | 4.7 | Keywords: | triaged | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Mac OS X | ||||||||||||
| Whiteboard: | stalebug | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Thomas Singer
Created attachment 267404 [details]
Sample code
Created attachment 267405 [details]
Initial situation
Created attachment 267406 [details]
After closing the first node programmatically on OS X 10.11
Created attachment 267408 [details]
After closing the first node programmatically on Windows 10
Even when changing the button's listener to
button.addListener(SWT.Selection, new Listener() {
@Override
public void handleEvent(Event event) {
final TreeItem nodeToCollapse = tree.getItem(0);
if (!nodeToCollapse.getExpanded()) {
return;
}
final TreeItem[] selection = tree.getSelection();
for (TreeItem selectedItem : selection) {
if (selectedItem.getParentItem() == nodeToCollapse) {
tree.deselect(selectedItem);
}
}
nodeToCollapse.setExpanded(false);
}
});
will select the collapsed node on Windows.
If I'd have the choice, I would take the approach OS X is using, because if I would want to have the parent selected, I easily can do it, but on Windows I can't. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |