dabo Commit
Revision 7047
Date: 2012-01-05 14:17:49 -0800 (Thu, 05 Jan 2012)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7047
Changed:
U trunk/dabo/ui/uiwx/uiApp.py
Log:
r6896 in October 2011 introduced a traceback when the preference dialog is
invoked
when there is no active MDI child form; fixed.
Also fixed the underlying problem to make the MDI Parent form the ActiveForm
when
it currently has no children.
Diff:
Modified: trunk/dabo/ui/uiwx/uiApp.py
===================================================================
--- trunk/dabo/ui/uiwx/uiApp.py 2012-01-02 14:51:46 UTC (rev 7046)
+++ trunk/dabo/ui/uiwx/uiApp.py 2012-01-05 22:17:49 UTC (rev 7047)
@@ -806,7 +806,9 @@
if self.PreferenceDialogClass:
dlgPref = getattr(af, "_prefDialog", None)
if dlgPref is None:
- dlgPref = af._prefDialog =
self.PreferenceDialogClass(af)
+ dlgPref = self.PreferenceDialogClass(af)
+ if af:
+ af._prefDialog = dlgPref
if isinstance(dlgPref, PreferenceDialog):
if af:
af.fillPreferenceDialog(dlgPref)
@@ -1244,7 +1246,9 @@
if af is None:
af = wx.GetActiveWindow()
if isinstance(af, wx.MDIParentFrame):
- af = af.GetActiveChild()
+ afc = af.GetActiveChild()
+ if afc:
+ return afc
return af
def _setActiveForm(self, frm):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]