From 1e680157a9469e0316e578bc8f21163c85b453ed Mon Sep 17 00:00:00 2001 From: Kvaz1r Date: Sat, 17 Jul 2021 20:48:31 +0300 Subject: [PATCH] Send event on toggle deselecting --- src/univ/listbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index b5bbb997c6..899d3e3ec1 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -1078,7 +1078,7 @@ void wxListBox::DoSelect(int item, bool sel) void wxListBox::SelectAndNotify(int item) { - if( item != -1 ) + if ( item != -1 ) { DoSelect(item); SendEvent(wxEVT_LISTBOX); @@ -1156,7 +1156,10 @@ bool wxListBox::PerformAction(const wxControlAction& action, item = m_current; if ( IsSelected(item) ) + { DoUnselect(item); + SendEvent(wxEVT_LISTBOX); + } else SelectAndNotify(item); }