Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311312 - Changing the selection in a gallery with multi select enabled can sometimes not trigger notifications to listeners
Summary: Changing the selection in a gallery with multi select enabled can sometimes n...
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Richeton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-02 11:03 EDT by islocated CLA
Modified: 2021-07-05 11:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description islocated CLA 2010-05-02 11:03:37 EDT
Build Identifier: 20100218-1602

I am running into a problem where the selection event is not triggered when I do a sequence of selections in a multi selection gallery.

If I left click on one item, it selects it and triggers the listener for the selection.  If I shift + left click on another item, it selects both items and also triggers the listener.  However, if I left click on the first item again, the selection changes to selecting only that first item, but it does not trigger the selection listeners.

I looked at the code and found this section onMouseHandleLeft.
On mouse up and item is not null, it does a notify only if the lastSingleClick is not the current item.

setSelected(item, true, lastSingleClick != item);

onMouseHandleLeftShift does not register lastSingleClick so after we shift + left click a few items, left clicking on the first item will change our selection, but lastSingleClick has never changed so the notification to the listeners aren't sent.

Reproducible: Always

Steps to Reproduce:
1. Create a gallery with SWT.MULTI style with a few items.
2. Left click on item one
3. Shift + Left click on item two
4. Left click on item one. (If you shift + left click, you will get notification)
5. Selection was changed but no selection event was triggered.
Comment 1 Wim Jongman CLA 2019-12-12 15:56:39 EST
This bug does not have a target milestone assigned and is automatically closed as part of the 2.3.0 release cleanup.

It could be that this bug is accidentally closed for which we apologize.

If this bug is still relevant, please re-open and set a target milestone.