X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76b49cf49ba9ee9f3eeec9730cb4bc4569ab17f1..24aab8e81a8627802e4111d9c99a50ece8d0026e:/src/xrc/xh_menu.cpp diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index 47e5494d7c..ee8530d615 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -21,10 +21,9 @@ #ifndef WX_PRECOMP #include "wx/frame.h" + #include "wx/menu.h" #endif -#include "wx/menu.h" - IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler) wxMenuXmlHandler::wxMenuXmlHandler() : @@ -37,7 +36,9 @@ wxObject *wxMenuXmlHandler::DoCreateResource() { if (m_class == wxT("wxMenu")) { - wxMenu *menu = new wxMenu(GetStyle()); + wxMenu *menu = m_instance ? wxStaticCast(m_instance, wxMenu) + : new wxMenu(GetStyle()); + wxString title = GetText(wxT("label")); wxString help = GetText(wxT("help"));