Fixed Cut command, added support for MenuBar inside Frame/Dialog.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Roman Rolinsky
2006-02-16 17:19:39 +00:00
parent eb3efe0d4b
commit 6165053b84
4 changed files with 14 additions and 6 deletions

View File

@@ -463,9 +463,12 @@ class Frame(wxFrame):
error = False
# Top-level
x = xxx.treeObject()
if x.__class__ in [xxxDialog, xxxFrame, xxxMenuBar, xxxWizard]:
if x.__class__ in [xxxDialog, xxxFrame, xxxWizard]:
# Top-level classes
if parent.__class__ != xxxMainNode: error = True
elif x.__class__ == xxxMenuBar:
# Menubar can be put in frame or dialog
if parent.__class__ not in [xxxMainNode, xxxFrame, xxxDialog]: error = True
elif x.__class__ == xxxToolBar:
# Toolbar can be top-level of child of panel or frame
if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame] and \
@@ -576,7 +579,7 @@ class Frame(wxFrame):
if evt.GetId() == wxID_CUT:
wx.TheClipboard.Open()
data = wx.CustomDataObject('XRCED')
data.SetData(cPickle.dumps(elem))
data.SetData(cPickle.dumps(elem.toxml()))
wx.TheClipboard.SetData(data)
wx.TheClipboard.Close()
tree.pendingHighLight = None