]> git.saurik.com Git - wxWidgets.git/commitdiff
keep m_value in sync with real combobox value (set it initially and update it correct...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 18 Sep 2004 19:51:39 +0000 (19:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 18 Sep 2004 19:51:39 +0000 (19:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index 0967e6e57442e254735f2e320b5c0ca9d03af605..5cd1e71bed94facc7bc128298967beb30d321eb8 100644 (file)
@@ -341,7 +341,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
                 // want the new one)
                 if ( sel == -1 )
                 {
-                    m_value = GetValue();
+                    m_value = wxGetWindowText(GetHwnd());
                 }
                 else // we're synthesizing text updated event from sel change
                 {
@@ -481,6 +481,7 @@ void wxComboBox::SetValue(const wxString& value)
     else
         SetWindowText(GetHwnd(), value.c_str());
 
+    m_value = value;
     m_selectionOld = GetSelection();
 }