diff --git a/inselect/app.py b/inselect/app.py index 635005e..53588f7 100644 --- a/inselect/app.py +++ b/inselect/app.py @@ -63,6 +63,8 @@ def main(args): window.show_from_geometry_settings() if parsed.file: + # Process messages before loading document + app.processEvents() window.open_file(parsed.file) if parsed.quit: diff --git a/inselect/gui/main_window.py b/inselect/gui/main_window.py index 11c1300..1a37e84 100644 --- a/inselect/gui/main_window.py +++ b/inselect/gui/main_window.py @@ -61,7 +61,7 @@ class MainWindow(QtGui.QMainWindow): IMAGE_FILE_FILTER = u'Images ({0})'.format(u' '.join(IMAGE_PATTERNS)) - def __init__(self, app, filename=None): + def __init__(self, app): super(MainWindow, self).__init__() self.app = app @@ -132,11 +132,6 @@ def __init__(self, app, filename=None): self.empty_document() - if filename: - # Process messages before loading document - QtGui.qApp.processEvents() - self.open_file(filename) - def _create_views(self): "Creates view objects" # Boxes view