X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53f60d4ab61af3d8f72eb2202b4cda96774531d8..f8ce98ded08fd7e5960f4aadfcf7e923df79222b:/src/common/lboxcmn.cpp diff --git a/src/common/lboxcmn.cpp b/src/common/lboxcmn.cpp index f7d4fb91a8..8787130451 100644 --- a/src/common/lboxcmn.cpp +++ b/src/common/lboxcmn.cpp @@ -86,8 +86,15 @@ void wxListBoxBase::DeselectAll(int itemToLeaveSelected) void wxListBoxBase::UpdateOldSelections() { + // We need to remember the selection even in single-selection case on + // Windows, so that we don't send an event when the user clicks on an + // already selected item. +#ifndef __WXMSW__ if (HasFlag(wxLB_MULTIPLE) || HasFlag(wxLB_EXTENDED)) +#endif + { GetSelections( m_oldSelections ); + } } bool wxListBoxBase::SendEvent(wxEventType evtType, int item, bool selected)