]> git.saurik.com Git - wxWidgets.git/commitdiff
SetValue is not adding a line if values does not exist
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 18 Aug 2004 19:00:56 +0000 (19:00 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 18 Aug 2004 19:00:56 +0000 (19:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/combobox.cpp

index f96f194e4ec3032e78091fabca73b9023ea69f40..f18e9ec3fa4d24f6d0c63e56b95533d8ba795d91 100644 (file)
@@ -375,12 +375,10 @@ int wxComboBox::GetCount() const
 
 void wxComboBox::SetValue(const wxString& value)
 {
 
 void wxComboBox::SetValue(const wxString& value)
 {
-    int s = FindString (value);
-    if (s == wxNOT_FOUND && !HasFlag(wxCB_READONLY) )
-    {
-        m_choice->Append(value) ;
-    }
-    SetStringSelection( value ) ;
+    if ( HasFlag(wxCB_READONLY) )
+        SetStringSelection( value ) ;
+    else
+        m_text->SetValue( value );
 }
 
 // Clipboard operations
 }
 
 // Clipboard operations