process CBN_SELENDOK and not only CBN_SELCHANGE (patch 1083907)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-02-19 20:57:50 +00:00
parent 964f23b70e
commit 78a87a5d73

View File

@ -304,11 +304,13 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
int sel = -1;
switch ( param )
{
case CBN_SELENDOK:
case CBN_SELCHANGE:
sel = GetSelection();
// somehow we get 2 CBN_SELCHANGE events with the same index when
// the user selects an item in the combobox -- ignore duplicates
// we may sometimes get 2 CBN_SELCHANGE events or a CBN_SELENDOK
// before CBN_SELCHANGE with the same index when the user selects
// an item in the combobox -- ignore duplicates
if ( sel > -1 && sel != m_selectionOld )
{
m_selectionOld = sel;