]> git.saurik.com Git - wxWidgets.git/commitdiff
process CBN_SELENDOK and not only CBN_SELCHANGE (patch 1083907)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 20:57:50 +0000 (20:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 20:57:50 +0000 (20:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index 0bd353a41a2f97b46c25dda003092f66e326b33b..0436320d2a058cfe647f8103c447921375bd5491 100644 (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;