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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user