X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5af80d3112462332d179fe79dd738cf093c99864..a246ab8b5e30b09705b485b6021c0149c80becda:/src/osx/button_osx.cpp diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp index 432f1f08af..32417fa88c 100644 --- a/src/osx/button_osx.cpp +++ b/src/osx/button_osx.cpp @@ -51,23 +51,23 @@ bool wxButton::Create(wxWindow *parent, const wxValidator& validator, const wxString& name) { - DontCreatePeer(); - - m_marginX = - m_marginY = 0; - // FIXME: this hack is needed because we're called from // wxBitmapButton::Create() with this style and we currently use a // different wxWidgetImpl method (CreateBitmapButton() rather than // CreateButton()) for creating bitmap buttons, but we really ought // to unify the creation of buttons of all kinds and then remove // this check - if ( style & wxBU_NOTEXT ) + if ( style & wxBU_NOTEXT && !ShouldCreatePeer() ) { return wxControl::Create(parent, id, pos, size, style, validator, name); } + DontCreatePeer(); + + m_marginX = + m_marginY = 0; + wxString label; // Ignore the standard label for help buttons if possible, they use "?"