[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8988 - trunk/gnue-forms/src
From: |
reinhard |
Subject: |
[gnue] r8988 - trunk/gnue-forms/src |
Date: |
Tue, 7 Nov 2006 12:27:17 -0600 (CST) |
Author: reinhard
Date: 2006-11-07 12:27:16 -0600 (Tue, 07 Nov 2006)
New Revision: 8988
Modified:
trunk/gnue-forms/src/GFForm.py
Log:
Block endEditing and beginEditing while executing endEditing, so it does not
get called recursively when doing autoquery.
Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py 2006-11-07 18:15:51 UTC (rev 8987)
+++ trunk/gnue-forms/src/GFForm.py 2006-11-07 18:27:16 UTC (rev 8988)
@@ -93,7 +93,7 @@
# Set to true while focus is moving so a record change in
# focusin/focusout triggers doesn't run endEditing and beginEditing
- self.__focus_moving = False
+ self.__editing_blocked = False
self._instance = instance
@@ -1093,7 +1093,7 @@
blockChange = (new_block != self._currentBlock) or row_offset != 0
pageChange = (new_page != self._currentPage)
- self.__focus_moving = True
+ self.__editing_blocked = True
try:
if self._currentEntry:
@@ -1146,7 +1146,7 @@
self._currentPage.focus_in()
self._currentEntry.focus_in()
finally:
- self.__focus_moving = False
+ self.__editing_blocked = False
# The Focus-In trigger of the block has already refreshed the toolbar,
# except for the case where the new entry has no block.
@@ -1801,8 +1801,15 @@
save it's value to the virtual form.
@return: Boolean, True if succeeded, False if failed.
"""
- if not self.__focus_moving and isinstance(self._currentEntry, GFEntry):
- self._currentEntry.endEdit()
+ if not self.__editing_blocked \
+ and isinstance(self._currentEntry, GFEntry):
+ # Block beginEditing and endEditing for everything that happens in
+ # endEdit, especially autoquery.
+ self.__editing_blocked = True
+ try:
+ self._currentEntry.endEdit()
+ finally:
+ self.__editing_blocked = False
# -------------------------------------------------------------------------
@@ -1810,7 +1817,8 @@
# -------------------------------------------------------------------------
def beginEditing(self):
- if not self.__focus_moving and isinstance(self._currentEntry, GFEntry):
+ if not self.__editing_blocked \
+ and isinstance(self._currentEntry, GFEntry):
self._currentEntry.beginEdit()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8988 - trunk/gnue-forms/src,
reinhard <=