Commit f31dd963a404fd6bec7a0d913dc93046901840e6
1 parent
cef887d7
Exists in
master
and in
68 other branches
ENH: Imports before splash window (#51)
Showing
1 changed file
with
11 additions
and
7 deletions
Show diff stats
invesalius/invesalius.py
... | ... | @@ -36,10 +36,6 @@ except OSError: |
36 | 36 | import wx |
37 | 37 | import wx.lib.pubsub as ps |
38 | 38 | |
39 | -from gui.frame import Frame | |
40 | -from control import Controller | |
41 | -from project import Project | |
42 | -from session import Session | |
43 | 39 | |
44 | 40 | class SplashScreen(wx.SplashScreen): |
45 | 41 | def __init__(self): |
... | ... | @@ -49,8 +45,16 @@ class SplashScreen(wx.SplashScreen): |
49 | 45 | 1500, None, -1) |
50 | 46 | self.Bind(wx.EVT_CLOSE, self.OnClose) |
51 | 47 | |
48 | + | |
49 | + from gui.frame import Frame | |
50 | + from control import Controller | |
51 | + from project import Project | |
52 | + from session import Session | |
53 | + | |
54 | + | |
52 | 55 | self.main = Frame(None) |
53 | 56 | self.control = Controller(self.main) |
57 | + | |
54 | 58 | self.fc = wx.FutureCall(1000, self.ShowMain) |
55 | 59 | |
56 | 60 | def OnClose(self, evt): |
... | ... | @@ -112,9 +116,7 @@ def parse_comand_line(): |
112 | 116 | # The user passed directory to me? |
113 | 117 | import_dir = options.dicom_dir |
114 | 118 | ps.Publisher().sendMessage('Import directory', import_dir) |
115 | - #print "Hey, guy you must pass a directory to me!" | |
116 | - #else: | |
117 | - # print "Hey, guy, you need to pass a inv3 file to me!" | |
119 | + return True | |
118 | 120 | |
119 | 121 | # Check if there is a file path somewhere in what the user wrote |
120 | 122 | else: |
... | ... | @@ -126,6 +128,8 @@ def parse_comand_line(): |
126 | 128 | path = os.path.abspath(file) |
127 | 129 | ps.Publisher().sendMessage('Open project', path) |
128 | 130 | i = 0 |
131 | + return True | |
132 | + return False | |
129 | 133 | |
130 | 134 | |
131 | 135 | def print_events(data): | ... | ... |