[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9001 - trunk/gnue-forms/src/uidrivers/wx26/widgets
From: |
johannes |
Subject: |
[gnue] r9001 - trunk/gnue-forms/src/uidrivers/wx26/widgets |
Date: |
Wed, 8 Nov 2006 07:49:07 -0600 (CST) |
Author: johannes
Date: 2006-11-08 07:49:06 -0600 (Wed, 08 Nov 2006)
New Revision: 9001
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
Don't segfault on closing a form with tabs showing not the first page
issue141 external
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2006-11-08
13:07:14 UTC (rev 9000)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2006-11-08
13:49:06 UTC (rev 9001)
@@ -258,6 +258,14 @@
def __on_set_focus(self, event):
+ # FIXME: workaround for issue-141: If not the first page of a notebook
+ # control is shown and one closes the form, an EVT_SET_FOCUS event is
+ # generated for widgets on the prior pages. At this time the main
+ # window is already destroyed and so it leads to a segmentation fault.
+ # To avoid it, we exit here if the main window is already destroyed
+ if self._uiForm.main_window is None:
+ return
+
# Let the GF focus follow
lookup = event.GetEventObject()
if 'wxMac' in wx.PlatformInfo and self._gfObject.style == 'dropdown':
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-11-08 13:07:14 UTC
(rev 9000)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-11-08 13:49:06 UTC
(rev 9001)
@@ -344,7 +344,7 @@
# if the last form that has been shown is open on a non-first page.
# So we set main_window to None when destroying the main window and
# don't call wx.EndBusyCursor() if main_window is None.
- if self.main_window and wx.IsBusy():
+ if self.main_window:
wx.EndBusyCursor()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9001 - trunk/gnue-forms/src/uidrivers/wx26/widgets,
johannes <=