fix windows wxpython locale error (#1187)

pull/1243/head
Kaalleen 2021-06-01 13:17:00 +02:00 zatwierdzone przez GitHub
rodzic e7089618a6
commit b3a6fdc761
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -30,6 +30,11 @@ class LetteringFrame(wx.Frame):
DEFAULT_FONT = "small_font"
def __init__(self, *args, **kwargs):
# This is necessary because of https://github.com/inkstitch/inkstitch/issues/1186
if sys.platform.startswith('win'):
import locale
locale.setlocale(locale.LC_ALL, "C")
# begin wxGlade: MyFrame.__init__
self.group = kwargs.pop('group')
self.cancel_hook = kwargs.pop('on_cancel', None)

Wyświetl plik

@ -330,6 +330,11 @@ class ParamsTab(ScrolledPanel):
class SettingsFrame(wx.Frame):
def __init__(self, *args, **kwargs):
# This is necessary because of https://github.com/inkstitch/inkstitch/issues/1186
if sys.platform.startswith('win'):
import locale
locale.setlocale(locale.LC_ALL, "C")
# begin wxGlade: MyFrame.__init__
self.tabs_factory = kwargs.pop('tabs_factory', [])
self.cancel_hook = kwargs.pop('on_cancel', None)