Commit 57107bf8e29a594a3c601f644d302d42ae711397
1 parent
249ee5c3
Exists in
master
and in
68 other branches
FIX: Splash error under darwin and win32 - SetShape
Showing
2 changed files
with
10 additions
and
8 deletions
Show diff stats
invesalius/invesalius.py
... | ... | @@ -34,7 +34,7 @@ if sys.platform != 'win32': |
34 | 34 | |
35 | 35 | import wx |
36 | 36 | import wx.lib.pubsub as ps |
37 | -import wx.lib.agw.advancedsplash as AS | |
37 | +import wx.lib.agw.advancedsplash as agw | |
38 | 38 | |
39 | 39 | import gui.language_dialog as lang_dlg |
40 | 40 | import i18n |
... | ... | @@ -67,7 +67,7 @@ class InVesalius(wx.App): |
67 | 67 | |
68 | 68 | # ------------------------------------------------------------------ |
69 | 69 | |
70 | -class SplashScreen(AS.AdvancedSplash): | |
70 | +class SplashScreen(agw.AdvancedSplash): | |
71 | 71 | """ |
72 | 72 | Splash screen to be shown in InVesalius initialization. |
73 | 73 | """ |
... | ... | @@ -127,13 +127,15 @@ class SplashScreen(AS.AdvancedSplash): |
127 | 127 | |
128 | 128 | bmp = wx.Image(path).ConvertToBitmap() |
129 | 129 | |
130 | - style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN | |
131 | - AS.AdvancedSplash.__init__(self, | |
130 | + style = wx.SPLASH_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN |\ | |
131 | + wx.FRAME_SHAPED | |
132 | + agw.AdvancedSplash.__init__(self, | |
132 | 133 | bitmap=bmp, |
133 | 134 | style=style, |
134 | 135 | timeout=5000, |
135 | 136 | id=-1, |
136 | 137 | parent=None) |
138 | + | |
137 | 139 | self.Bind(wx.EVT_CLOSE, self.OnClose) |
138 | 140 | |
139 | 141 | # Importing takes sometime, therefore it will be done | ... | ... |
invesalius/session.py
... | ... | @@ -231,10 +231,10 @@ class WriteSession(Thread): |
231 | 231 | def run(self): |
232 | 232 | while self.runing: |
233 | 233 | time.sleep(10) |
234 | - #try: | |
235 | - self.Write() | |
236 | - #except AttributeError: | |
237 | - # pass | |
234 | + try: | |
235 | + self.Write() | |
236 | + except AttributeError: | |
237 | + debug("Session: trying to write into inexistent file") | |
238 | 238 | |
239 | 239 | def Stop(self): |
240 | 240 | self.runing = 0 | ... | ... |