Make virtual lists send DESELECTED events consistently on both implementations

In the case when a listctrl is clicked outside of any item, the item is
visually deselected, and it is logical that a DESELECTED is sent.

For non-virtual lists this would happen, but for virtual lists it would
either happen or not happen depending on implementation (MSW/generic)
and mode (single/multi). From now on the DESELECTED event is always sent.
This commit is contained in:
Lauri Nurmi
2019-11-12 21:22:05 +02:00
parent 9d9b0c51c8
commit 96b83a1523
3 changed files with 65 additions and 56 deletions

View File

@@ -1442,7 +1442,7 @@ protected:
control itself when this event is generated, see @ref
overview_events_with_mouse_capture "event handling overview".
@event{EVT_LIST_ITEM_DESELECTED(id, func)}
The item has been deselected.
The item has been deselected. GetIndex() may be -1 with virtual lists.
@event{EVT_LIST_ITEM_ACTIVATED(id, func)}
The item has been activated (ENTER or double click).
@event{EVT_LIST_ITEM_FOCUSED(id, func)}