X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18b9d1a13c513bc0e2df984cf21b3bc131864c61..43f4e852a1b2ac37c3db6a2b87315192ac549191:/src/xrc/xh_bttn.cpp diff --git a/src/xrc/xh_bttn.cpp b/src/xrc/xh_bttn.cpp index 963efd0848..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("direction"); - 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);