--- a/controls/DurationCellEditor.py Thu Apr 21 20:42:37 2016 +0300
+++ b/controls/DurationCellEditor.py Fri Apr 22 16:24:06 2016 +0300
@@ -118,15 +118,22 @@
self.CellControl.SetValue(self.Table.GetValueByName(row, self.Colname))
self.CellControl.SetFocus()
- def EndEdit(self, row, col, grid):
+ def EndEditInternal(self, row, col, grid, old_duration): duration = self.CellControl.GetValue()
- old_duration = self.Table.GetValueByName(row, self.Colname)
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): + self.EndEditInternal(row, col, grid, oldval) + def EndEdit(self, row, col, grid): + oldval = self.Table.GetValueByName(row, self.Colname) + self.EndEditInternal(row, col, grid, oldval) self.CellControl.SetDimensions(rect.x + 1, rect.y,