[Commits] (donn) Fixed a minor bug when you edit an attribute in a
grid
commits at osafoundation.org
commits at osafoundation.org
Sun Jan 23 14:45:55 PST 2005
Commit by: donn
Modified files:
chandler/parcels/osaf/framework/blocks/ControlBlocks.py 1.155 1.156
Log message:
Fixed a minor bug when you edit an attribute in a grid
-----------------------------------------------
* When you edit an item, but make no change, it was raising an exception
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/ControlBlocks.py.diff?r1=text&tr1=1.155&r2=text&tr2=1.156
Index: chandler/parcels/osaf/framework/blocks/ControlBlocks.py
diff -u chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.155 chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.156
--- chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.155 Sun Jan 23 14:42:53 2005
+++ chandler/parcels/osaf/framework/blocks/ControlBlocks.py Sun Jan 23 14:45:53 2005
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.155 $"
-__date__ = "$Date: 2005/01/23 22:42:53 $"
+__version__ = "$Revision: 1.156 $"
+__date__ = "$Date: 2005/01/23 22:45:53 $"
__copyright__ = "Copyright (c) 2003-2005 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -744,6 +744,7 @@
def EndEdit (self, row, column, grid):
value = self.delegate.GetControlValue (self.control)
+ item, attributeName = grid.GetElementValue (row, column)
if value == self.initialValue:
changed = False
# @@@ For now we do not want to allow users to blank out fields. This should eventually be
@@ -758,7 +759,6 @@
except AttributeError:
grid.SetElementValue (row, column, value)
else:
- item, attributeName = grid.GetElementValue (row, column)
attributeSetter (item, attributeName, value)
self.delegate.EndControlEdit (item, attributeName, self.control)
return changed
More information about the Commits
mailing list