dabo Commit
Revision 1872
Date: 2006-01-27 08:01:09 -0800 (Fri, 27 Jan 2006)
Author: paul
Changed:
U trunk/dabo/ui/uiwx/dFormMixin.py
Log:
The double-Activate on Windows is really getting in the way. I haven't heard
anything from my bug report yet, so I added workaround code to ignore the first
Activate.
Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py 2006-01-27 05:48:31 UTC (rev 1871)
+++ trunk/dabo/ui/uiwx/dFormMixin.py 2006-01-27 16:01:09 UTC (rev 1872)
@@ -1,4 +1,5 @@
import os
+import sys
import wx, dabo
import dPemMixin as pm
import dBaseMenuBar as mnb
@@ -15,6 +16,11 @@
src=None, attProperties=None, *args, **kwargs):
self._childList = None
self._codeDict = None
+
+ # Windows sends two Activate events, and one of them is too
early.
+ # Skip the first one.
+ self._skipActivate = (sys.platform[:3] == "win")
+
if src:
# This is being created from a Class Designer file.
try:
@@ -323,7 +329,11 @@
""" Raise the Dabo Activate or Deactivate appropriately.
"""
if bool(evt.GetActive()):
- self.raiseEvent(dEvents.Activate, evt)
+ if self._skipActivate:
+ # Skip the first activate (Windows)
+ self._skipActivate = False
+ else:
+ self.raiseEvent(dEvents.Activate, evt)
else:
self.raiseEvent(dEvents.Deactivate, evt)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev