dabo Commit
Revision 6152
Date: 2010-10-24 10:56:20 -0700 (Sun, 24 Oct 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6152

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

Log:
This moves the updating of inactive pages back into the original update cycle, 
instead of unconditionally updating all pages when they become active.


Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py      2010-10-24 17:12:05 UTC (rev 6151)
+++ trunk/dabo/ui/uiwx/__init__.py      2010-10-24 17:56:20 UTC (rev 6152)
@@ -173,7 +173,9 @@
 import dUICursors as dUICursors
 import dShell
 import gridRenderers
+from dPageFrameMixin import dPageFrameMixin
 
+
 # Needs importing after at least dPanel:
 from dDockForm import dDockForm
 

Modified: trunk/dabo/ui/uiwx/dPageFrameMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPageFrameMixin.py       2010-10-24 17:12:05 UTC (rev 
6151)
+++ trunk/dabo/ui/uiwx/dPageFrameMixin.py       2010-10-24 17:56:20 UTC (rev 
6152)
@@ -87,10 +87,6 @@
 
                if newPageNum >= 0 and self.PageCount > newPageNum:
                        newPage = self.Pages[newPageNum]
-                       ## On Mac and Win, wx.GetShown() returns False for 
inactive pages,
-                       ## so update() would have been ignored for this 
newly-coming-active
-                       ## page. Therefore, call it unconditionally now:
-                       newPage.update()
                        dabo.ui.callAfter(newPage.raiseEvent, dEvents.PageEnter)
                        dabo.ui.callAfter(self.raiseEvent, dEvents.PageChanged,
                                        oldPageNum=oldPageNum, 
newPageNum=newPageNum)

Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py     2010-10-24 17:12:05 UTC (rev 6151)
+++ trunk/dabo/ui/uiwx/dPemMixin.py     2010-10-24 17:56:20 UTC (rev 6152)
@@ -1281,9 +1281,12 @@
 
        def __onUpdate(self, evt):
                """Update any dynamic properties, and then call the update() 
hook."""
-               if isinstance(self, dabo.ui.deadObject) or not 
self._constructed() \
-                               or not self.Visible:
+               if isinstance(self, dabo.ui.deadObject) or not 
self._constructed():
                        return
+               if not self.Visible and not isinstance(self.Parent, 
dabo.ui.dPageFrameMixin):
+                       ## (on Windows and Mac, inactive pages will return 
Visible==False, but
+                       ##  we need those pages updated too).
+                       return
                self.update()
 
 



_______________________________________________
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