From 78a87a5d73f90996161912b8a2ee257834f6f8fb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Feb 2005 20:57:50 +0000 Subject: [PATCH] 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 --- src/msw/combobox.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 0bd353a41a..0436320d2a 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -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; -- 2.45.2