Commit 980767425dd371672a6a57d04249364b0014a957

Authored by tatiana
1 parent f31dd963

FIX: Bug caused by commits 1261 and 1262

Showing 1 changed file with 8 additions and 5 deletions   Show diff stats
invesalius/invesalius.py
@@ -21,6 +21,8 @@ import multiprocessing @@ -21,6 +21,8 @@ import multiprocessing
21 from optparse import OptionParser 21 from optparse import OptionParser
22 import os 22 import os
23 import sys 23 import sys
  24 +from session import Session
  25 +
24 26
25 # TODO: This should be called during installation 27 # TODO: This should be called during installation
26 # ---------------------------------------------------------------------- 28 # ----------------------------------------------------------------------
@@ -40,22 +42,21 @@ import wx.lib.pubsub as ps @@ -40,22 +42,21 @@ import wx.lib.pubsub as ps
40 class SplashScreen(wx.SplashScreen): 42 class SplashScreen(wx.SplashScreen):
41 def __init__(self): 43 def __init__(self):
42 bmp = wx.Image("../icons/splash_en.png").ConvertToBitmap() 44 bmp = wx.Image("../icons/splash_en.png").ConvertToBitmap()
43 - wx.SplashScreen.__init__(self, bmp,  
44 - wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,  
45 - 1500, None, -1) 45 + wx.SplashScreen.__init__(self, bitmap=bmp,
  46 + splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
  47 + milliseconds=1, id=-1, parent=None)
46 self.Bind(wx.EVT_CLOSE, self.OnClose) 48 self.Bind(wx.EVT_CLOSE, self.OnClose)
47 49
48 50
49 from gui.frame import Frame 51 from gui.frame import Frame
50 from control import Controller 52 from control import Controller
51 from project import Project 53 from project import Project
52 - from session import Session  
53 54
54 55
55 self.main = Frame(None) 56 self.main = Frame(None)
56 self.control = Controller(self.main) 57 self.control = Controller(self.main)
57 58
58 - self.fc = wx.FutureCall(1000, self.ShowMain) 59 + self.fc = wx.FutureCall(1, self.ShowMain)
59 60
60 def OnClose(self, evt): 61 def OnClose(self, evt):
61 # Make sure the default handler runs too so this window gets 62 # Make sure the default handler runs too so this window gets
@@ -82,6 +83,8 @@ class InVesalius(wx.App): @@ -82,6 +83,8 @@ class InVesalius(wx.App):
82 #self.control = Controller(self.main) 83 #self.control = Controller(self.main)
83 self.SetAppName("InVesalius 3") 84 self.SetAppName("InVesalius 3")
84 splash = SplashScreen() 85 splash = SplashScreen()
  86 + self.control = splash.control
  87 + self.frame = splash.main
85 splash.Show() 88 splash.Show()
86 89
87 return True 90 return True