prevent showing RuntimeError on_stitch_plan_rendered (#3097)

pull/3102/head dev-build-kaalleen-about
Kaalleen 2024-07-20 09:22:35 +02:00 zatwierdzone przez GitHub
rodzic 252818f7a9
commit 94caf919ff
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -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()