chiark / gitweb /
Force the window on screen.
authordaid303 <daid303@gmail.com>
Fri, 29 Mar 2013 09:34:57 +0000 (10:34 +0100)
committerdaid303 <daid303@gmail.com>
Fri, 29 Mar 2013 09:34:57 +0000 (10:34 +0100)
Cura/gui/mainWindow.py

index 4bfcef61b1e4c04756af249f53591577b855d98f..0028207159923f4b07f956f559cf45cdf51a2e26 100644 (file)
@@ -229,6 +229,11 @@ class mainWindow(wx.Frame):
 
                if wx.Display.GetFromPoint(self.GetPosition()) < 0:
                        self.Centre()
+               if wx.Display.GetFromPoint((self.GetPositionTuple()[0] + self.GetSizeTuple()[1], self.GetPositionTuple()[1] + self.GetSizeTuple()[1])) < 0:
+                       self.Centre()
+               if wx.Display.GetFromPoint(self.GetPosition()) < 0:
+                       self.SetSize((800,600))
+                       self.Centre()
 
                self.updateSliceMode()