Fix bug in RestoreLastLayout mechanism when last window size was default window size
authorLaurent Bessard
Thu, 04 Oct 2012 17:58:45 +0200
changeset 849 7abb3f33b72d
parent 848 fe9504c4104e
child 850 072188d4d812
Fix bug in RestoreLastLayout mechanism when last window size was default window size
IDEFrame.py
--- a/IDEFrame.py	Thu Oct 04 17:56:29 2012 +0200
+++ b/IDEFrame.py	Thu Oct 04 17:58:45 2012 +0200
@@ -709,11 +709,6 @@
     def OnResize(self, event):
         if self.Starting:
             self.RestoreLastLayout()
-            if wx.Platform == '__WXMSW__':
-                wx.CallAfter(self.ResetStarting)
-            else:
-                self.ResetStarting()
-            wx.CallAfter(self.RefreshEditor)
         event.Skip()
     
     def GetProjectConfiguration(self):
@@ -854,6 +849,7 @@
             self.Maximize()
         else:
             self.SetClientSize(frame_size)
+            wx.CallAfter(self.RestoreLastLayout)
         
     def RestoreLastLayout(self):
         notebooks = {}
@@ -887,6 +883,12 @@
         self.LoadProjectLayout()
         
         self._Refresh(EDITORTOOLBAR)
+        
+        if wx.Platform == '__WXMSW__':
+            wx.CallAfter(self.ResetStarting)
+        else:
+            self.ResetStarting()
+        wx.CallAfter(self.RefreshEditor)
     
     def SaveLastState(self):
         if not self.IsMaximized():