--- a/controls/DurationCellEditor.py Sun Mar 18 19:18:23 2012 +0100
+++ b/controls/DurationCellEditor.py Sun Mar 18 21:47:58 2012 +0100
@@ -129,15 +129,17 @@
self.CellControl.PushEventHandler(evt_handler)
def BeginEdit(self, row, col, grid):
+ self.CellControl.Enable()
self.CellControl.SetValue(self.Table.GetValueByName(row, 'Interval'))
self.CellControl.SetFocus()
def EndEdit(self, row, col, grid):
duration = self.CellControl.GetValue()
old_duration = self.Table.GetValueByName(row, 'Interval')
- if duration != old_duration:
+ changed = duration != old_duration
+ if changed:
self.Table.SetValueByName(row, 'Interval', duration)
- return True
+ self.CellControl.Disable()
return False
def SetSize(self, rect):