Fix deprecated WX call producing warning.
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Wed, 24 Jan 2024 10:42:10 +0100
changeset 3895 b8f301b75567
parent 3894 25e9b557f1b8
child 3896 df7ce3e1f44d
Fix deprecated WX call producing warning.
editors/Viewer.py
--- a/editors/Viewer.py	Wed Jan 24 10:41:09 2024 +0100
+++ b/editors/Viewer.py	Wed Jan 24 10:42:10 2024 +0100
@@ -634,7 +634,7 @@
 
             add_menu = wx.Menu(title='')
             self.AddAddMenuItems(add_menu)
-            menu.AppendMenu(-1, _('Add'), add_menu)
+            menu.Append(wx.ID_NEW, _('Add'), add_menu)
 
         menu.AppendSeparator()
 
@@ -2184,8 +2184,6 @@
             wx.CallAfter(self.SetCurrentCursor, 0)
         elif not self.Debug:
             self.PopupDefaultMenu(False)
-        if self.Editor.HasCapture():
-            self.Editor.ReleaseMouse()
         event.Skip()
 
     def OnViewerLeftDClick(self, event):