From 668a9475439b71a06300eb82a4f7695187273ff9 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Thu, 22 Aug 2019 08:05:36 +0300 Subject: [PATCH] Use copy-paste fix only on Mac --- gui/auxFrame.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/auxFrame.py b/gui/auxFrame.py index b0709fd6e..30237cfac 100644 --- a/gui/auxFrame.py +++ b/gui/auxFrame.py @@ -42,9 +42,11 @@ class AuxiliaryFrame(wx.Frame): if name is not None: kwargs['name'] = name super().__init__(**kwargs) - # Intercept copy-paste actions and do nothing in secondary windows - self.Bind(wx.EVT_MENU, self.OnSuppressedAction, id=wx.ID_COPY) - self.Bind(wx.EVT_MENU, self.OnSuppressedAction, id=wx.ID_PASTE) + # Intercept copy-paste actions and do nothing in secondary windows, + # otherwise on Mac OS X Cmd-C brings up copy fit dialog + if 'wxMac' in wx.PlatformInfo: + self.Bind(wx.EVT_MENU, self.OnSuppressedAction, id=wx.ID_COPY) + self.Bind(wx.EVT_MENU, self.OnSuppressedAction, id=wx.ID_PASTE) if 'wxMSW' in wx.PlatformInfo: self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))