]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
Filter index wasn't being set for multiple file dialog
[wxWidgets.git] / src / msw / combobox.cpp
index a01a5d9d2496df15fbeecb325fcc4e49271d5a7f..f71cb41a3f5352e0f8838abadb693efe184228f9 100644 (file)
@@ -311,6 +311,14 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
                 }
                 else // we're synthesizing text updated event from sel change
                 {
+                    // We need to retrieve the current selection because the user
+                    // may have changed it in the previous handler (for CBN_SELCHANGE
+                    // above).
+                    sel = GetSelection();
+                    if ( sel > -1 )
+                    {
+                        value = GetString(sel);
+                    }
                     // we need to do this because the user code expects
                     // wxComboBox::GetValue() to return the new value from
                     // "text updated" handler but it hadn't been updated yet