Fix wxListBox selection handling broken by r64500.
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 25 Aug 2010 15:02:30 +0000 (15:02 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 25 Aug 2010 15:02:30 +0000 (15:02 +0000)
commita614ffae7187a70bf353cc1bbf4873ee65c58e34
treed37fb9765d923fa74d2275ba93709ca22edf5ff9
parenta6856aa899706c5fef9dd4c10bfaac66f9114195
Fix wxListBox selection handling broken by r64500.

r64500 introduced tracking of previous selection in wxMSW's wxListBox so
that an event isn't sent when the user clicks already selected item
again. Unfortunately, it forgot to account for programatic changes of
selection (e.g. when all items are removed, so is the selection) and
didn't update selection book-keeping information in that case. The
result was that the event wasn't sent when it should be in some cases.

Fixed by using UpdateOldSelections() even in single-selection case in
wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/listbox.h
src/common/lboxcmn.cpp