dabo Commit
Revision 6833
Date: 2011-09-08 14:00:41 -0700 (Thu, 08 Sep 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6833

Changed:
U   trunk/dabo/ui/uiwx/dPageFrameMixin.py

Log:
- Removed unneeded import.
- Changed PageChanging propagation preventing code.
- Changed abuse message log level from error to warning.

Diff:
Modified: trunk/dabo/ui/uiwx/dPageFrameMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPageFrameMixin.py       2011-09-08 19:27:38 UTC (rev 
6832)
+++ trunk/dabo/ui/uiwx/dPageFrameMixin.py       2011-09-08 21:00:41 UTC (rev 
6833)
@@ -1,6 +1,5 @@
 # -*- coding: utf-8 -*-
 import sys
-import time
 import wx
 import dabo
 import dabo.ui
@@ -41,9 +40,8 @@
 
        def __onPageChanging(self, evt):
                """The page has not yet been changed, so we can veto it if 
conditions call for it."""
-               if self != evt.EventObject:
-                       # Avoid events propagated from child frames.
-                       return
+               # Avoid event propagated from child frames.
+               evt.StopPropagation()
                oldPageNum = evt.GetOldSelection()
                newPageNum = evt.GetSelection()
                if self._beforePageChange(oldPageNum, newPageNum) is False:
@@ -113,7 +111,7 @@
                                try:
                                        newPage._restoreLastActiveControl()
                                except AttributeError:
-                                       dabo.log.error(MSG_SMART_FOCUS_ABUSE % 
self.Name)
+                                       dabo.log.warn(MSG_SMART_FOCUS_ABUSE % 
self.Name)
 
 
        # Image-handling function



_______________________________________________
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]

Reply via email to