X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff6871ef3d4453660dfa9f178b8d7d2a5cd8ee0e..b3231f0aaf369e384d41b2e5890b75a3e26f3fea:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index e001a48818..f18e9ec3fa 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -42,7 +42,7 @@ MenuHandle NewUniqueMenu() #if TARGET_API_MAC_OSX // margin should be bigger on OS X due to blue highlight // around text control. -static const wxCoord MARGIN = 6; +static const wxCoord MARGIN = 4; // this is the border a focus rect on OSX is needing static const int TEXTFOCUSBORDER = 3 ; #else @@ -375,12 +375,10 @@ int wxComboBox::GetCount() const 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