]> git.saurik.com Git - wxWidgets.git/commitdiff
update the value shown in the combobox itself correctly in SetValue() (patch 1669275...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Mar 2007 23:46:03 +0000 (23:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Mar 2007 23:46:03 +0000 (23:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/combocmn.cpp

index 2595b6ad92ace1787abfa67ff16d40f82bb3fa68..d1c34dfbebac376cecde554c7e313b5670e789e9 100644 (file)
@@ -2191,16 +2191,18 @@ void wxComboCtrlBase::SetValueWithEvent(const wxString& value, bool withEvent)
             m_text->SelectAll();
     }
 
-    m_valueString = value;
-
-    Refresh();
-
     // Since wxComboPopup may want to paint the combo as well, we need
     // to set the string value here (as well as sometimes in ShowPopup).
-    if ( m_valueString != value && m_popupInterface )
+    if ( m_valueString != value )
     {
+        m_valueString = value;
+
+        EnsurePopupControl();
+
         m_popupInterface->SetStringValue(value);
     }
+
+    Refresh();
 }
 
 void wxComboCtrlBase::SetValue(const wxString& value)