Commit d9462a682d20ca6b1e7b098586731e3703306e03
1 parent
73b26029
Exists in
master
and in
68 other branches
FIX: splash window initialized at the same time lang dialog under darwin (#52)
Showing
2 changed files
with
3 additions
and
8 deletions
Show diff stats
invesalius/gui/language_dialog.py
@@ -24,15 +24,13 @@ import wx.combo | @@ -24,15 +24,13 @@ import wx.combo | ||
24 | import i18n | 24 | import i18n |
25 | import constants as const | 25 | import constants as const |
26 | 26 | ||
27 | -def create(parent): | ||
28 | - return LanguageDialog(parent) | ||
29 | 27 | ||
30 | class LanguageDialog(wx.Dialog): | 28 | class LanguageDialog(wx.Dialog): |
31 | """Class define the language to be used in the InVesalius, | 29 | """Class define the language to be used in the InVesalius, |
32 | exist chcLanguage that list language EN and PT. The language | 30 | exist chcLanguage that list language EN and PT. The language |
33 | selected is writing in the config.ini""" | 31 | selected is writing in the config.ini""" |
34 | 32 | ||
35 | - def __init__(self, parent, startApp = None): | 33 | + def __init__(self, parent = None, startApp = None): |
36 | 34 | ||
37 | self.__TranslateMessage__() | 35 | self.__TranslateMessage__() |
38 | 36 |
invesalius/invesalius.py
@@ -54,8 +54,7 @@ class SplashScreen(wx.SplashScreen): | @@ -54,8 +54,7 @@ class SplashScreen(wx.SplashScreen): | ||
54 | 54 | ||
55 | if not(lang): | 55 | if not(lang): |
56 | 56 | ||
57 | - ldlg = lang_dlg.create(parent=None) | ||
58 | - ldlg.Show() | 57 | + ldlg = lang_dlg.LanguageDialog() |
59 | 58 | ||
60 | if (ldlg.ShowModal() == wx.ID_OK): | 59 | if (ldlg.ShowModal() == wx.ID_OK): |
61 | lang = ldlg.GetSelectedLanguage() | 60 | lang = ldlg.GetSelectedLanguage() |
@@ -100,9 +99,7 @@ class SplashScreen(wx.SplashScreen): | @@ -100,9 +99,7 @@ class SplashScreen(wx.SplashScreen): | ||
100 | 99 | ||
101 | if not(lang): | 100 | if not(lang): |
102 | 101 | ||
103 | - ldlg = lang_dlg.create(parent=None) | ||
104 | - ldlg.Show() | ||
105 | - | 102 | + ldlg = lang_dlg.LanguageDialog() |
106 | if (ldlg.ShowModal() == wx.ID_OK): | 103 | if (ldlg.ShowModal() == wx.ID_OK): |
107 | lang = ldlg.GetSelectedLanguage() | 104 | lang = ldlg.GetSelectedLanguage() |
108 | session.SetLanguage(lang) | 105 | session.SetLanguage(lang) |