Author: reinhard
Date: 2005-09-20 12:15:24 -0500 (Tue, 20 Sep 2005)
New Revision: 7932
Modified:
trunk/gnue-forms/src/GFObjects/GFField.py
Log:
Do not update the UI in GFField.setValue if the block is in init mode, because
initializing records are not visible in the UI yet.
Modified: trunk/gnue-forms/src/GFObjects/GFField.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFField.py 2005-09-20 15:45:21 UTC (rev
7931)
+++ trunk/gnue-forms/src/GFObjects/GFField.py 2005-09-20 17:15:24 UTC (rev
7932)
@@ -365,13 +365,13 @@
### self.dispatchEvent('canCOMMIT')
### self.dispatchEvent('canROLLBACK')
- # If the field value has changed do to a trigger
- # then update the UI
- self._block._form.updateUIEntry(self)
+ # If the field value of the current record has changed, update the UI
+ if mode != 'init': # init doesn't affect current record!
+ self._block._form.updateUIEntry(self)
- # If the field is a foreign key, move the result set to the selected value
- if hasattr(self,'_GFField__fk_resultSet'):
- self.__fk_resultSet.findRecord({self.fk_key: value})
+ # If the field is a foreign key, move the result set to the selected
value
+ if hasattr(self,'_GFField__fk_resultSet'):
+ self.__fk_resultSet.findRecord({self.fk_key: value})
# ---------------------------------------------------------------------------
_______________________________________________
Commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue