dabo Commit
Revision 4174
Date: 2008-06-21 05:34:23 -0700 (Sat, 21 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4174
Changed:
U trunk/dabo/ui/dialogs/PreferenceDialog.py
Log:
In some cases, the Preference window opens so that app.ActiveForm returns None.
If this happens, use the Parent, if any, as the active form.
Diff:
Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py 2008-06-20 18:11:01 UTC (rev
4173)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py 2008-06-21 12:34:23 UTC (rev
4174)
@@ -116,11 +116,14 @@
the class's IncludeDefaultPages property is True.
"""
af = self.Application.ActiveForm
+ if not af or af is self:
+ af = self.Parent
try:
mb = af.MenuBar
menuOK = True
except:
menuOK = False
+ mb = None
if menuOK:
pm = af.PreferenceManager.menu
self.preferenceKeys.append(pm)
_______________________________________________
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]