Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091111 Firefox/3.5.5 (.NET CLR 3.5.30729) Build Identifier: I20090611-1540 A Tree widget with an already selected element but no focus does not emit a selectionChanged event when regaining focus. My use case: 2 different widgets ((Table)widget1, (Tree)widget2) as selection providers of a View. When both have a selection, and focus switches from widget1 to widget2 by directly right-clicking on the selected element of widget2, no selectionChanged event gets emitted -> the appearing context menu's selection context is the now inactive element of widget1. Workaround: catch the focus event and manually fire a selectionChanged event. Reproducible: Always
Selection events are sent when the selection changes. In the case you described, the selection is not changing (the focus is). Therefore, not sending an event is the correct behaviour, agreed ? (I verified that GTK behaves the same way). closing as wont fix.
I would also not expect a selection event because the focus changes (which can also be done with the tab key). But on left-click, you currently always get a selection event (even if the item has already been selected before). You could also send a redundant event on right-click.
Felipe, I basically agree with you that selectionChanged events should be fired when the selection changes. The problem here is consistency when clicking an already selected element: * For a Table element, a selectionChanged event gets fired upon a LEFT and RIGHT mouse click * For a Tree element, a selectionChanged event gets fired only upon a LEFT mouse click, but not upon a RIGHT mouse click. I suggest a consistent implementation, i.e., sending a redundant selectionChanged event as suggested by Markus in comment#2.
On GTK, both the Table and Tree widgets does not send Selection events on Right click, which appears to be appropriate. May be, Windows behavior should be aligned to GTK.
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. If you have further information on the current state of the bug, please add it. 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.
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.