Skip to content

Commit

Permalink
If running under OSX and wx3, override wx.ID_COPY and wx.ID_PASTE. Se…
Browse files Browse the repository at this point in the history
…e GH Issue #456
  • Loading branch information
blitzmann committed Dec 4, 2015
1 parent 4325cca commit 0a10f2d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gui/mainMenuBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def __init__(self):
self.attrEditorId = wx.NewId()
self.toggleOverridesId = wx.NewId()

if 'wxMac' in wx.PlatformInfo and wx.VERSION >= (3,0):
wx.ID_COPY = wx.NewId()
wx.ID_PASTE = wx.NewId()

self.mainFrame = gui.mainFrame.MainFrame.getInstance()
wx.MenuBar.__init__(self)

Expand Down Expand Up @@ -77,10 +81,8 @@ def __init__(self):
#editMenu.Append(wx.ID_UNDO)
#editMenu.Append(wx.ID_REDO)

copyText = "&To Clipboard" + ("\tCTRL+C" if 'wxMSW' in wx.PlatformInfo else "")
pasteText = "&From Clipboard" + ("\tCTRL+V" if 'wxMSW' in wx.PlatformInfo else "")
editMenu.Append(wx.ID_COPY, copyText, "Export a fit to the clipboard")
editMenu.Append(wx.ID_PASTE, pasteText, "Import a fit from the clipboard")
editMenu.Append(wx.ID_COPY, "To Clipboard\tCTRL+C", "Export a fit to the clipboard")
editMenu.Append(wx.ID_PASTE, "From Clipboard\tCTRL+V", "Import a fit from the clipboard")
editMenu.AppendSeparator()
editMenu.Append(self.saveCharId, "Save Character")
editMenu.Append(self.saveCharAsId, "Save Character As...")
Expand Down

0 comments on commit 0a10f2d

Please sign in to comment.