Author: reinhard
Date: 2006-10-17 12:03:32 -0500 (Tue, 17 Oct 2006)
New Revision: 8825

Modified:
   trunk/gnue-forms/src/GFForm.py
Log:
Run focus-out triggers also before closing the form; run focus-out and focus-in
triggers before and after committing a record.


Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py      2006-10-17 16:59:36 UTC (rev 8824)
+++ trunk/gnue-forms/src/GFForm.py      2006-10-17 17:03:32 UTC (rev 8825)
@@ -1257,10 +1257,16 @@
 
         self.endEditing()
 
+        if self._currentBlock is not None:
+            self._currentBlock.focus_out()
+
         try:
             # Do the actual work
             self.execute_commit()
         finally:
+
+            if self._currentBlock is not None:
+                self._currentBlock.focus_in()
             self.beginEditing()
 
     # -------------------------------------------------------------------------
@@ -1624,12 +1630,11 @@
 
     def execute_close(self):
 
+        if self._currentBlock is not None:
+            self._currentBlock._focus_out()
+
         self.processTrigger('Pre-Exit', ignoreAbort = False)
 
-        if self._currentBlock is not None:
-            if self._currentBlock.autoCommit and not self.isSaved():
-                self.execute_commit()
-
         if not self.__must_save():
             return
 



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to