From 390f8114604241cd21193ddb2c624ca21e1f1322 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 May 2006 20:33:17 +0000 Subject: [PATCH] Avoid flags that may clash with alignment flags Don't try to set the string selection if not found git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/button.cpp | 4 +--- src/univ/combobox.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/univ/button.cpp b/src/univ/button.cpp index f41f45b6e6..995a3becaa 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -78,9 +78,7 @@ bool wxButton::Create(wxWindow *parent, label = wxGetStockLabel(id); long ctrl_style = style & ~wxBU_ALIGN_MASK; - - wxASSERT_MSG( (ctrl_style & wxALIGN_MASK) == 0, - _T("Some style conflicts with align flags") ); + ctrl_style = ctrl_style & ~wxALIGN_MASK; if((style & wxBU_RIGHT) == wxBU_RIGHT) ctrl_style |= wxALIGN_RIGHT; diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index b9b03b00c3..8647a82611 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -130,7 +130,7 @@ wxString wxComboListBox::GetStringValue() const void wxComboListBox::SetStringValue(const wxString& value) { - if ( !value.empty() ) + if ( !value.empty() && (FindString(value) != wxNOT_FOUND) ) wxListBox::SetStringSelection(value); else wxListBox::SetSelection(-1);