X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0544bc0aab888b4e064de10e451a4fa94ba0f33a..a3736ef475f212f1f7b07c36278ba83d7511406c:/src/gtk/radiobut.cpp?ds=sidebyside diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index 3550885060..f7771f4ea6 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -63,17 +63,14 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab { m_acceptsFocus = TRUE; m_needParent = TRUE; - - wxSize newSize = size; - - PreCreation( parent, id, pos, newSize, style, name ); - m_isRadioButton = TRUE; - -#if wxUSE_VALIDATORS - SetValidator( validator ); -#endif + if (!PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, validator, name )) + { + wxFAIL_MSG( _T("wxRadioButton creation failed") ); + return FALSE; + } if (HasFlag(wxRB_GROUP)) { @@ -111,6 +108,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab SetLabel(label); + wxSize newSize = size; if (newSize.x == -1) newSize.x = 22+gdk_string_measure( m_widget->style->font, label.mbc_str() ); if (newSize.y == -1) newSize.y = 26; SetSize( newSize.x, newSize.y );