controls/DurationCellEditor.py
changeset 657 b286a16162fc
parent 655 435e2d8ee580
child 663 6ea5c76ea7bc
--- 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):