# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1651840833 -7200
# Node ID 6279ec06df98770fa87cf07246fe9575fd11ac8b
# Parent  523f6fcc7a28ab58f2b8ebd00fc29d1f5d0323b4
wxPython4 sequels: usual naming problem in grid cell change events, non kw-args to menu.Append and event not being skipped.

diff -r 523f6fcc7a28 -r 6279ec06df98 dialogs/DurationEditorDialog.py
--- a/dialogs/DurationEditorDialog.py	Thu Apr 07 15:28:24 2022 +0200
+++ b/dialogs/DurationEditorDialog.py	Fri May 06 14:40:33 2022 +0200
@@ -153,6 +153,7 @@
         return duration
 
     def OnOK(self, event):
+        event.Skip()
         self.OnCloseDialog()
 
     def OnCloseDialog(self):
diff -r 523f6fcc7a28 -r 6279ec06df98 editors/DataTypeEditor.py
--- a/editors/DataTypeEditor.py	Thu Apr 07 15:28:24 2022 +0200
+++ b/editors/DataTypeEditor.py	Fri May 06 14:40:33 2022 +0200
@@ -47,7 +47,7 @@
 
 
 def AppendMenu(parent, help, kind, text):
-    return parent.Append(help=help, id=wx.ID_ANY, kind=kind, text=text)
+    return parent.Append(wx.MenuItem(helpString=help, id=wx.ID_ANY, kind=kind, text=text))
 
 
 def GetElementsTableColnames():
@@ -375,7 +375,7 @@
 
         self.StructureElementsGrid = CustomGrid(self.StructurePanel,
                                                 size=wx.Size(0, 150), style=wx.VSCROLL)
-        self.StructureElementsGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGING,
+        self.StructureElementsGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGED,
                                         self.OnStructureElementsGridCellChange)
         self.StructureElementsGrid.Bind(wx.grid.EVT_GRID_EDITOR_SHOWN,
                                         self.OnStructureElementsGridEditorShown)
diff -r 523f6fcc7a28 -r 6279ec06df98 editors/ResourceEditor.py
--- a/editors/ResourceEditor.py	Thu Apr 07 15:28:24 2022 +0200
+++ b/editors/ResourceEditor.py	Fri May 06 14:40:33 2022 +0200
@@ -247,7 +247,7 @@
             tasks_buttons_sizer.Add(button)
 
         self.TasksGrid = CustomGrid(self.Editor, style=wx.VSCROLL)
-        self.TasksGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGING, self.OnTasksGridCellChange)
+        self.TasksGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGED, self.OnTasksGridCellChange)
         tasks_sizer.Add(self.TasksGrid, flag=wx.GROW)
 
         instances_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5)
@@ -277,7 +277,7 @@
             instances_buttons_sizer.Add(button)
 
         self.InstancesGrid = CustomGrid(self.Editor, style=wx.VSCROLL)
-        self.InstancesGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGING, self.OnInstancesGridCellChange)
+        self.InstancesGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGED, self.OnInstancesGridCellChange)
         instances_sizer.Add(self.InstancesGrid, flag=wx.GROW)
 
         self.Editor.SetSizer(main_sizer)