Fixed a traceback that occurred when calling critical_error_message_box and friends while the splashscreen is disabled in the settings.

This commit is contained in:
Arjan Schrijver 2013-03-18 14:30:31 +01:00
parent 2cb47f6040
commit 47c48618bc
1 changed files with 6 additions and 3 deletions

View File

@ -681,7 +681,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
``message``
The message to be displayed.
"""
self.application.splash.close()
if hasattr(self.application, u'splash'):
self.application.splash.close()
QtGui.QMessageBox.critical(self, title, message)
def warning_message(self, title, message):
@ -694,7 +695,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
``message``
The message to be displayed.
"""
self.application.splash.close()
if hasattr(self.application, u'splash'):
self.application.splash.close()
QtGui.QMessageBox.warning(self, title, message)
def information_message(self, title, message):
@ -707,7 +709,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
``message``
The message to be displayed.
"""
self.application.splash.close()
if hasattr(self.application, u'splash'):
self.application.splash.close()
QtGui.QMessageBox.information(self, title, message)
def onHelpWebSiteClicked(self):