]> git.saurik.com Git - wxWidgets.git/commit
Don't send SELECTED events for an already selected item in wxGTK wxListBox.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Oct 2010 23:21:55 +0000 (23:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Oct 2010 23:21:55 +0000 (23:21 +0000)
commit24ee1bef74a8f403ad3df207edd9d656648c4da5
tree330b32d310e82aacbc3404dd91156b4ccfdee3e4
parentaf0b20630c6820b704e976284e3be27bea6aaf85
Don't send SELECTED events for an already selected item in wxGTK wxListBox.

Bring wxGTK in line with wxMSW behaviour and avoid sending the
wxEVT_COMMAND_LISTBOX_SELECTED events when the user clicks on an already
selected item.

Refactor wxMSW code to extract the logic to avoid such events into a reusable
in other ports wxListBoxBase::DoChangeSingleSelection() function. Also add
wxListBox::GTKOnSelectionChanged() to wxGTK to avoid having to make the new
function public just so that it could be called by GTK callback and make the
previously existing CalcAndSendEvent() protected as well.

This fixes a unit test failure in ListBoxTestCase::ClickEvents() under wxGTK.

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