# HG changeset patch # User Andrey Skvortsov # Date 1461331446 -10800 # Node ID 8626bba4b2a8e814cc98f54686c155a443a2d345 # Parent b11045a2f17c96812e856fa2a35f6de8045865ec fix issue, that was impossible to change time interval for cyclic tasks, when wx 3.0 is used diff -r b11045a2f17c -r 8626bba4b2a8 controls/DurationCellEditor.py --- 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 if changed: self.Table.SetValueByName(row, self.Colname, duration) self.CellControl.Disable() return changed + if wx.VERSION >= (3, 0, 0): + def EndEdit(self, row, col, grid, oldval): + self.EndEditInternal(row, col, grid, oldval) + else: + def EndEdit(self, row, col, grid): + oldval = self.Table.GetValueByName(row, self.Colname) + self.EndEditInternal(row, col, grid, oldval) + def SetSize(self, rect): self.CellControl.SetDimensions(rect.x + 1, rect.y, rect.width, rect.height,