Skip to content

Commit

Permalink
Process events before opening file
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed May 16, 2016
1 parent 027e380 commit 985473d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions inselect/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 1 addition & 6 deletions inselect/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 985473d

Please sign in to comment.