From: Daid Date: Mon, 29 Oct 2012 09:27:13 +0000 (+0100) Subject: Fix the splashscreen overlaying on the first run wizard on mac. X-Git-Tag: 13.03~223 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=afd27022de0ca8ad9011bd8b1d6dec705137d108;p=cura.git Fix the splashscreen overlaying on the first run wizard on mac. --- diff --git a/Cura/cura.py b/Cura/cura.py index 24c43c0e..35fb8f68 100644 --- a/Cura/cura.py +++ b/Cura/cura.py @@ -78,9 +78,9 @@ def main(): from gui import splashScreen splashScreen.showSplash(mainWindowRunCallback) -def mainWindowRunCallback(): +def mainWindowRunCallback(splash): from gui import mainWindow - mainWindow.main() + mainWindow.main(splash) if __name__ == '__main__': main() diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index ca6cc04d..0c318ec8 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -24,7 +24,7 @@ from util import version from util import sliceRun from util import meshLoader -def main(): +def main(splash): #app = wx.App(False) if profile.getPreference('machine_type') == 'unknown': if platform.system() == "Darwin": @@ -38,6 +38,7 @@ def main(): for filename in glob.glob(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', '*.*'))): shutil.copy(filename, os.path.join(os.path.dirname(exampleFile), os.path.basename(filename))) profile.putPreference('lastFile', exampleFile) + splash.Show(False) configWizard.configWizard() if profile.getPreference('startMode') == 'Simple': simpleMode.simpleModeWindow() diff --git a/Cura/gui/splashScreen.py b/Cura/gui/splashScreen.py index ee9a9455..cfa4792b 100644 --- a/Cura/gui/splashScreen.py +++ b/Cura/gui/splashScreen.py @@ -17,7 +17,7 @@ class splashScreen(wx.SplashScreen): wx.CallAfter(self.DoCallback) def DoCallback(self): - self.callback() + self.callback(self) self.Destroy() def showSplash(callback): @@ -25,7 +25,7 @@ def showSplash(callback): splashScreen(callback) app.MainLoop() -def testCallback(): +def testCallback(splashscreen): print "Callback!" import time time.sleep(2)