--- a/WampOptionsEditor.py Mon Dec 07 11:21:19 2020 +0100
+++ b/WampOptionsEditor.py Mon Mar 29 15:34:50 2021 +0200
@@ -345,21 +345,19 @@
self.CellControl.SetValue(self.table.GetValueByName(self.row, self.colname))
self.CellControl.SetFocus()
- def EndEditInternal(self, row, col, grid, old_duration):
- duration = self.CellControl.GetValue()
- changed = duration != old_duration
- self.table.SetValueByName(row, self.colname, duration)
- self.CellControl.Disable()
- if wx.VERSION >= (3, 0, 0):
- def EndEdit(self, row, col, grid, oldval):
- return self.EndEditInternal(row, col, grid, oldval)
- def EndEdit(self, row, col, grid):
- oldval = self.table.GetValueByName(row, self.colname)
- return self.EndEditInternal(row, col, grid, oldval)
+ def EndEdit(self, row, col, grid, oldval): + value = self.CellControl.GetValue() + changed = value != oldval + def ApplyEdit(self, row, col, grid): + value = self.CellControl.GetValue() + self.table.SetValueByName(row, self.colname, value) + self.CellControl.Disable() self.CellControl.SetDimensions(rect.x + 1, rect.y,