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 | 24 | import i18n |
25 | 25 | import constants as const |
26 | 26 | |
27 | -def create(parent): | |
28 | - return LanguageDialog(parent) | |
29 | 27 | |
30 | 28 | class LanguageDialog(wx.Dialog): |
31 | 29 | """Class define the language to be used in the InVesalius, |
32 | 30 | exist chcLanguage that list language EN and PT. The language |
33 | 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 | 35 | self.__TranslateMessage__() |
38 | 36 | ... | ... |
invesalius/invesalius.py
... | ... | @@ -54,8 +54,7 @@ class SplashScreen(wx.SplashScreen): |
54 | 54 | |
55 | 55 | if not(lang): |
56 | 56 | |
57 | - ldlg = lang_dlg.create(parent=None) | |
58 | - ldlg.Show() | |
57 | + ldlg = lang_dlg.LanguageDialog() | |
59 | 58 | |
60 | 59 | if (ldlg.ShowModal() == wx.ID_OK): |
61 | 60 | lang = ldlg.GetSelectedLanguage() |
... | ... | @@ -100,9 +99,7 @@ class SplashScreen(wx.SplashScreen): |
100 | 99 | |
101 | 100 | if not(lang): |
102 | 101 | |
103 | - ldlg = lang_dlg.create(parent=None) | |
104 | - ldlg.Show() | |
105 | - | |
102 | + ldlg = lang_dlg.LanguageDialog() | |
106 | 103 | if (ldlg.ShowModal() == wx.ID_OK): |
107 | 104 | lang = ldlg.GetSelectedLanguage() |
108 | 105 | session.SetLanguage(lang) | ... | ... |