summaryrefslogtreecommitdiff
path: root/lib/gui/simulator.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-03-20 22:43:54 -0400
committerLex Neva <github.com@lexneva.name>2019-03-21 21:09:03 -0400
commiteada4bed7eb5cf8671eed8e208889db88552815b (patch)
tree0824e77bd6d3ff3b67b934dc90e7137843f87e86 /lib/gui/simulator.py
parent90fe0451695dafc8fff2272b122c9112dd205bd6 (diff)
don't let simulator preview thread crash
Diffstat (limited to 'lib/gui/simulator.py')
-rw-r--r--lib/gui/simulator.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gui/simulator.py b/lib/gui/simulator.py
index e0d78983..c601ab66 100644
--- a/lib/gui/simulator.py
+++ b/lib/gui/simulator.py
@@ -699,7 +699,14 @@ class SimulatorPreview(Thread):
self.update_patches()
def update_patches(self):
- patches = self.parent.generate_patches(self.refresh_needed)
+ try:
+ patches = self.parent.generate_patches(self.refresh_needed)
+ except:
+ # If something goes wrong when rendering patches, it's not great,
+ # but we don't really want the simulator thread to crash. Instead,
+ # just swallow the exception and abort. It'll show up when they
+ # try to actually embroider the shape.
+ return
if patches and not self.refresh_needed.is_set():
stitch_plan = patches_to_stitch_plan(patches)