Author: reinhard
Date: 2007-06-05 03:40:55 -0500 (Tue, 05 Jun 2007)
New Revision: 9659

Modified:
   trunk/gnue-forms/src/GFForm.py
Log:
Switch off editing mode while On-Activation trigger runs, so the trigger code
can change the field value even for the first entry on the form.


Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py      2007-06-05 08:22:40 UTC (rev 9658)
+++ trunk/gnue-forms/src/GFForm.py      2007-06-05 08:40:55 UTC (rev 9659)
@@ -434,7 +434,13 @@
         self.__find_and_change_focus([self._currentPage], False)
 
         assert gDebug(4, "Processing activation trigger")
+        # Switch off editing mode so the On-Activation trigger can cleanly
+        # change the field value even of the first field in the form. Usually,
+        # changing the value of a field while an associated entry is in editing
+        # mode doesn't work.
+        self.endEditing()
         self.processTrigger('On-Activation')
+        self.beginEditing()
 
         self.__visible = True
 



_______________________________________________
commit-gnue mailing list
commit-gnue@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to