params error message callafter (#1153)

pull/1155/head
Kaalleen 2021-04-16 18:15:22 +02:00 zatwierdzone przez GitHub
rodzic 13c8c81be8
commit fc2c9c4385
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -381,8 +381,7 @@ class SettingsFrame(wx.Frame):
nodes.sort(key=lambda node: node.order)
try:
self.warning_panel.Hide()
self.Layout()
wx.CallAfter(self._hide_warning)
for node in nodes:
if abort_early.is_set():
# cancel; params were updated and we need to start over
@ -394,9 +393,7 @@ class SettingsFrame(wx.Frame):
patches.extend(copy(node).embroider(None))
except SystemExit:
self.warning_panel.Show()
self.Layout()
wx.CallAfter(self._show_warning)
raise
except Exception:
# Ignore errors. This can be things like incorrect paths for
@ -405,6 +402,14 @@ class SettingsFrame(wx.Frame):
return patches
def _hide_warning(self):
self.warning_panel.Hide()
self.Layout()
def _show_warning(self):
self.warning_panel.Show()
self.Layout()
def get_preset_data(self):
# called by self.presets_panel