dabo Commit
Revision 5037
Date: 2009-02-07 11:09:01 -0800 (Sat, 07 Feb 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5037

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

Log:
Moved the saving of size and position to the close event handler instead of 
doing it in resize and move. Thanks Jacek!

Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2009-02-07 19:00:02 UTC (rev 5036)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2009-02-07 19:09:01 UTC (rev 5037)
@@ -145,8 +145,6 @@
                self.bindEvent(dEvents.Activate, self.__onActivate)
                self.bindEvent(dEvents.Deactivate, self.__onDeactivate)
                self.bindEvent(dEvents.Close, self.__onClose)
-               self.bindEvent(dEvents.Resize, self.__onResize)
-               self.bindEvent(dEvents.Move, self.__onMove)
                self.bindEvent(dEvents.Paint, self.__onPaint)
                self.bindEvent(dEvents.Idle, self.__onIdle)
        
@@ -195,19 +193,10 @@
                
        
        def __onDeactivate(self, evt):
-#              self.saveSizeAndPosition()
                if self.Application is not None and self.Application.ActiveForm 
== self:
                        self.Application.clearActiveForm(self)
-       
 
-       def __onMove(self, evt):
-               dabo.ui.callAfterInterval(800, self.saveSizeAndPosition)
        
-       
-       def __onResize(self, evt):
-               dabo.ui.callAfterInterval(800, self.saveSizeAndPosition)
-                       
-       
        def __onPaint(self, evt):
                if self.Application:
                        self.__needOutlineRedraw = 
self.Application.DrawSizerOutlines
@@ -222,6 +211,7 @@
        
        
        def __onClose(self, evt):
+               self.saveSizeAndPosition()
                force = evt.EventData["force"]
                if not force:
                        if self._beforeClose(evt) == False:
@@ -239,12 +229,6 @@
                # On the Mac, this next line prevents Bus Errors when closing a 
form.
                self.Visible = False    
 
-               # pkm: Not sure about this SetFocus() call, but there may have 
been a 
-               #      good reason. On Windows, though, it results in an extra 
cycle
-               #      of deactivate/activate, and it doesn't seem right that 
this 
-               #      would be needed, so I'm commenting it out.
-               #self.SetFocus()
-
                if app is not None:
                        self.Application.uiForms.remove(self)
 



_______________________________________________
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