X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f4e2e269ca47563c0ea7c02971ba76b401f47d1..815f65bd0f673965230ed915d794497a8818dd35:/src/xrc/xh_bttn.cpp diff --git a/src/xrc/xh_bttn.cpp b/src/xrc/xh_bttn.cpp index 926b6849b9..7f2058cdd2 100644 --- a/src/xrc/xh_bttn.cpp +++ b/src/xrc/xh_bttn.cpp @@ -53,33 +53,8 @@ wxObject *wxButtonXmlHandler::DoCreateResource() if ( GetParamNode("bitmap") ) { - wxDirection dir; - const wxString dirstr = GetParamValue("bitmapposition"); - if ( dirstr.empty() || dirstr == "wxLEFT" ) - dir = wxLEFT; - else if ( dirstr == "wxRIGHT" ) - dir = wxRIGHT; - else if ( dirstr == "wxTOP" ) - dir = wxTOP; - else if ( dirstr == "wxBOTTOM" ) - dir = wxBOTTOM; - else - { - ReportError - ( - GetParamNode("bitmapposition"), - wxString::Format - ( - "Invalid bitmap position \"%s\": must be one of " - "wxLEFT|wxRIGHT|wxTOP|wxBOTTOM.", - dirstr - ) - ); - - dir = wxLEFT; - } - - button->SetBitmap(GetBitmap("bitmap", wxART_BUTTON), dir); + button->SetBitmap(GetBitmap("bitmap", wxART_BUTTON), + GetDirection("bitmapposition")); } SetupWindow(button);