adapting single selection deselect to generic listctrl 1812903
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2967,7 +2967,6 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID,
|
|||||||
bool trigger = false;
|
bool trigger = false;
|
||||||
|
|
||||||
wxListEvent event( wxEVT_COMMAND_LIST_ITEM_SELECTED, list->GetId() );
|
wxListEvent event( wxEVT_COMMAND_LIST_ITEM_SELECTED, list->GetId() );
|
||||||
bool isSingle = (list->GetWindowStyle() & wxLC_SINGLE_SEL) != 0;
|
|
||||||
|
|
||||||
event.SetEventObject( list );
|
event.SetEventObject( list );
|
||||||
if ( !list->IsVirtual() )
|
if ( !list->IsVirtual() )
|
||||||
@@ -2987,7 +2986,8 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID,
|
|||||||
{
|
{
|
||||||
case kDataBrowserItemDeselected:
|
case kDataBrowserItemDeselected:
|
||||||
event.SetEventType(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
|
event.SetEventType(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
|
||||||
if ( !isSingle )
|
// as the generic implementation is also triggering this
|
||||||
|
// event for single selection, we do the same (different than listbox)
|
||||||
trigger = !IsSelectionSuppressed();
|
trigger = !IsSelectionSuppressed();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user