IDE: fix exception when showing project's context menu in case of empty clipboard (wxpython4). wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Sun, 15 Jan 2023 21:40:58 +0100
branchwxPython4
changeset 3716 3dafdb6ad023
parent 3715 961903c0b76d
child 3717 da9ffd572551
IDE: fix exception when showing project's context menu in case of empty clipboard (wxpython4).
IDEFrame.py
--- a/IDEFrame.py	Sun Jan 01 23:10:16 2023 +0100
+++ b/IDEFrame.py	Sun Jan 15 21:40:58 2023 +0100
@@ -1927,7 +1927,7 @@
                 new_item = AppendMenu(menu, help='', kind=wx.ITEM_NORMAL, text=_("Paste POU"))
                 self.Bind(wx.EVT_MENU, self.OnPastePou, new_item)
                 if self.GetCopyBuffer() is None:
-                    menu.Enable(new_item, False)
+                    new_item.Enable(False)
 
             elif name == "Configurations":
                 menu = wx.Menu(title='')