From 515c91da6673ef91d07f0a9ef972c7fe644d6d9d Mon Sep 17 00:00:00 2001 From: Roman Rolinsky Date: Thu, 13 Feb 2003 11:07:59 +0000 Subject: [PATCH] fixed problem with pasting wxMenu in wxMenuBar and others git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/tools/XRCed/xrced.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wxPython/wxPython/tools/XRCed/xrced.py b/wxPython/wxPython/tools/XRCed/xrced.py index 4b02453ce8..dc2b5b9973 100644 --- a/wxPython/wxPython/tools/XRCed/xrced.py +++ b/wxPython/wxPython/tools/XRCed/xrced.py @@ -489,6 +489,8 @@ class Frame(wxFrame): if not parent.__class__ in [xxxMenu, xxxToolBar]: error = true elif x.__class__ == xxxTool: if parent.__class__ != xxxToolBar: error = true + elif x.__class__ == xxxMenu: + if not parent.__class__ in [xxxMainNode, xxxMenuBar, xxxMenu]: error = true elif x.__class__ == xxxMenuItem: if not parent.__class__ in [xxxMenuBar, xxxMenu]: error = true elif x.isSizer and parent.__class__ == xxxNotebook: error = true @@ -508,7 +510,7 @@ class Frame(wxFrame): isChildContainer = isinstance(xxx, xxxChildContainer) if isChildContainer and \ ((parent.isSizer and not isinstance(xxx, xxxSizerItem)) or \ - (isinstance(parent, xxxNotebook) and not isinstance(xxx, xxxNotebookPage)) or \ + (isinstance(parent, xxxNotebook) and not isinstance(xxx, xxxNotebookPage)) or \ not (parent.isSizer or isinstance(parent, xxxNotebook))): elem.removeChild(xxx.child.element) # detach child elem.unlink() # delete child container