From 94caf919ff7cd5f2114fcb0f4d385f63197d354b Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 20 Jul 2024 09:22:35 +0200 Subject: prevent showing RuntimeError on_stitch_plan_rendered (#3097) --- lib/extensions/params.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 9a51226f..dd5c427c 100755 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -595,9 +595,13 @@ class SettingsPanel(wx.Panel): return tabs def on_stitch_plan_rendered(self, stitch_plan): - self.simulator.stop() - self.simulator.load(stitch_plan) - self.simulator.go() + try: + self.simulator.stop() + self.simulator.load(stitch_plan) + self.simulator.go() + except RuntimeError: + # this can happen when they close the window at a bad time + pass def _hide_warning(self): self.warning_panel.clear() -- cgit v1.2.3