commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8985 - trunk/gnue-forms/src/input/displayHandlers


From: reinhard
Subject: [gnue] r8985 - trunk/gnue-forms/src/input/displayHandlers
Date: Tue, 7 Nov 2006 11:17:56 -0600 (CST)

Author: reinhard
Date: 2006-11-07 11:17:55 -0600 (Tue, 07 Nov 2006)
New Revision: 8985

Modified:
   trunk/gnue-forms/src/input/displayHandlers/Cursor.py
Log:
Make sure the entry is not in editing mode while the value of the field is set,
so that at the time the autoquery runs, the entry is not editing.


Modified: trunk/gnue-forms/src/input/displayHandlers/Cursor.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Cursor.py        2006-11-07 
16:50:05 UTC (rev 8984)
+++ trunk/gnue-forms/src/input/displayHandlers/Cursor.py        2006-11-07 
17:17:55 UTC (rev 8985)
@@ -221,6 +221,11 @@
     if not self.editing:
       return
 
+    # Set editing to False early. The later call to __updateFieldValue() can,
+    # if it is an autoquery field, cause a query to run, in which case editing
+    # should not be True at that moment.
+    self.editing = False
+
     if not self._loadedAllowedValues:
       self.field.allowedValues()
       self._loadedAllowedValues = True
@@ -228,14 +233,13 @@
     self._selection1 = None
 
     if self.modified:
-      self.__updateFieldValue()
-      self.editing = False
-      self._buildDisplay()
+      try:
+        self.__updateFieldValue()
+        self._buildDisplay()
+      except:
+        self.editing = True
 
-    else:
-      self.editing = False
 
-
   def _addText(self, event):
     """
     Handles the adding of new text 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]