Fix the splashscreen overlaying on the first run wizard on mac.
parent
e662a4214f
commit
afd27022de
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue