X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18b9d1a13c513bc0e2df984cf21b3bc131864c61..beee38cb41aa2ce4fbe9052bf4f70e1be184b553:/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);