chiark / gitweb /
Do not try to hide the splash screen twice
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Sun, 28 Dec 2014 01:32:01 +0000 (20:32 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Sun, 28 Dec 2014 01:32:03 +0000 (20:32 -0500)
It's possible the splashscreen gets destroyed when it gets hidden,
which could cause the crash mentioned in issue #14. We set the splash
to None after we hide it as we don't need to retry hiding it after.

Cura/gui/app.py

index 38b7f8ad14d16178e4aa37a1d5e6aba7f00eb4dd..996ab67098916c968b54b99d0009109f17b04a05 100644 (file)
@@ -130,6 +130,7 @@ class CuraApp(wx.App):
                        self.loadFiles = [exampleFile]
                        if self.splash is not None:
                                self.splash.Show(False)
+                               self.splash = None
                        configWizard.configWizard()
 
                if profile.getPreference('check_for_updates') == 'True':
@@ -137,6 +138,7 @@ class CuraApp(wx.App):
                        if newVersion is not None:
                                if self.splash is not None:
                                        self.splash.Show(False)
+                                       self.splash = None
                                if wx.MessageBox(_("A new version of Cura is available, would you like to download?"), _("New version available"), wx.YES_NO | wx.ICON_INFORMATION) == wx.YES:
                                        webbrowser.open(newVersion)
                                        return
@@ -145,6 +147,7 @@ class CuraApp(wx.App):
                self.mainWindow = mainWindow.mainWindow()
                if self.splash is not None:
                        self.splash.Show(False)
+                       self.splash = None
                self.SetTopWindow(self.mainWindow)
                self.mainWindow.Show()
                self.mainWindow.OnDropFiles(self.loadFiles)