summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/extensions/params.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/extensions/params.py b/lib/extensions/params.py
index 37f10f0e..38cb6818 100644
--- a/lib/extensions/params.py
+++ b/lib/extensions/params.py
@@ -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