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,10 +36,6 @@ except OSError: | ||
36 | import wx | 36 | import wx |
37 | import wx.lib.pubsub as ps | 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 | class SplashScreen(wx.SplashScreen): | 40 | class SplashScreen(wx.SplashScreen): |
45 | def __init__(self): | 41 | def __init__(self): |
@@ -49,8 +45,16 @@ class SplashScreen(wx.SplashScreen): | @@ -49,8 +45,16 @@ class SplashScreen(wx.SplashScreen): | ||
49 | 1500, None, -1) | 45 | 1500, None, -1) |
50 | self.Bind(wx.EVT_CLOSE, self.OnClose) | 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 | self.main = Frame(None) | 55 | self.main = Frame(None) |
53 | self.control = Controller(self.main) | 56 | self.control = Controller(self.main) |
57 | + | ||
54 | self.fc = wx.FutureCall(1000, self.ShowMain) | 58 | self.fc = wx.FutureCall(1000, self.ShowMain) |
55 | 59 | ||
56 | def OnClose(self, evt): | 60 | def OnClose(self, evt): |
@@ -112,9 +116,7 @@ def parse_comand_line(): | @@ -112,9 +116,7 @@ def parse_comand_line(): | ||
112 | # The user passed directory to me? | 116 | # The user passed directory to me? |
113 | import_dir = options.dicom_dir | 117 | import_dir = options.dicom_dir |
114 | ps.Publisher().sendMessage('Import directory', import_dir) | 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 | # Check if there is a file path somewhere in what the user wrote | 121 | # Check if there is a file path somewhere in what the user wrote |
120 | else: | 122 | else: |
@@ -126,6 +128,8 @@ def parse_comand_line(): | @@ -126,6 +128,8 @@ def parse_comand_line(): | ||
126 | path = os.path.abspath(file) | 128 | path = os.path.abspath(file) |
127 | ps.Publisher().sendMessage('Open project', path) | 129 | ps.Publisher().sendMessage('Open project', path) |
128 | i = 0 | 130 | i = 0 |
131 | + return True | ||
132 | + return False | ||
129 | 133 | ||
130 | 134 | ||
131 | def print_events(data): | 135 | def print_events(data): |