diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-12-07 15:13:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-07 15:13:22 +0100 |
| commit | 154309906f34bc3213eb4775dbebc58a1ec7f779 (patch) | |
| tree | f59fe1d2bdea4e92af35596fba02eaa247e54406 /lib/gui/simulator/simulator_preferences.py | |
| parent | cf2a44ef8e4ff53d6649a3c5dccb35c283dc7ab2 (diff) | |
save more simulator settings (#3323)
Diffstat (limited to 'lib/gui/simulator/simulator_preferences.py')
| -rw-r--r-- | lib/gui/simulator/simulator_preferences.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gui/simulator/simulator_preferences.py b/lib/gui/simulator/simulator_preferences.py index d42de4f0..ea134d22 100644 --- a/lib/gui/simulator/simulator_preferences.py +++ b/lib/gui/simulator/simulator_preferences.py @@ -58,14 +58,16 @@ class SimulatorPreferenceDialog(wx.Dialog): self.drawing_panel.update_pen_size() self.drawing_panel.Refresh() - def on_apply(self, event): + def save_settings(self): global_settings['simulator_line_width'] = self.line_width.GetValue() global_settings['simulator_npp_size'] = self.npp_size.GetValue() + + def on_apply(self, event): + self.save_settings() self.Close() def on_cancel(self, event): - global_settings['simulator_line_width'] = self.line_width_value - global_settings['simulator_npp_size'] = self.npp_size_value + self.save_settings() if self.drawing_panel.loaded: self.drawing_panel.update_pen_size() self.drawing_panel.Refresh() |
