diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-07-21 10:52:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-21 10:52:13 +0200 |
| commit | c49e8d2f773276a149011f9b628e539f63ad24a3 (patch) | |
| tree | 2ee45db105d9d3d2f346c9fb58f3b7dee06d8e26 | |
| parent | 44ba93a861983b03eaa18a97b13f49475fb7d3a5 (diff) | |
fix more runtime errors when simulator closes (#3101)
| -rw-r--r-- | lib/gui/simulator/drawing_panel.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gui/simulator/drawing_panel.py b/lib/gui/simulator/drawing_panel.py index aced1587..9b705716 100644 --- a/lib/gui/simulator/drawing_panel.py +++ b/lib/gui/simulator/drawing_panel.py @@ -277,9 +277,12 @@ class DrawingPanel(wx.Panel): return if not self.animating: - self.animating = True - self.animate() - self.control_panel.on_start() + try: + self.animating = True + self.animate() + self.control_panel.on_start() + except RuntimeError: + pass def color_to_pen(self, color): line_width = global_settings['simulator_line_width'] * PIXELS_PER_MM * self.PIXEL_DENSITY |
