summaryrefslogtreecommitdiff
path: root/lib/gui/simulator/drawing_panel.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-01-09 17:06:07 +0100
committerGitHub <noreply@github.com>2025-01-09 17:06:07 +0100
commitca02ac5b015dd64ebe3d13b8cc2021535a369161 (patch)
tree9c3d63dd71be5dcc3fcb253a041236482c54b5e4 /lib/gui/simulator/drawing_panel.py
parentb8f5241755466b2432f89a11c2d5ccdf5a9ae3f2 (diff)
save and reload simulator speed (optionally) (#3420)
Diffstat (limited to 'lib/gui/simulator/drawing_panel.py')
-rw-r--r--lib/gui/simulator/drawing_panel.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gui/simulator/drawing_panel.py b/lib/gui/simulator/drawing_panel.py
index cb70db2d..ced11f00 100644
--- a/lib/gui/simulator/drawing_panel.py
+++ b/lib/gui/simulator/drawing_panel.py
@@ -65,7 +65,7 @@ class DrawingPanel(wx.Panel):
self.background_color = None
# desired simulation speed in stitches per second
- self.speed = 16
+ self.speed = global_settings['simulator_speed']
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_SIZE, self.choose_zoom_and_pan)
@@ -399,6 +399,7 @@ class DrawingPanel(wx.Panel):
def set_speed(self, speed):
self.speed = speed
+ global_settings['simulator_speed'] = speed
def forward(self):
self.direction = 1