diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-06-25 23:46:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-25 23:46:50 +0200 |
| commit | 850958b5bc6017da66fad041dabc6ddd7b8d9f69 (patch) | |
| tree | 5ba42bcd4153631d58e9fb3d48ba25411f4adf74 /lib/gui/simulator/simulator_preferences.py | |
| parent | 75a9ea2e1dc16bfc8b41d9a747fdb29b5d3d0b14 (diff) | |
Simulator: make colors visible on background (#3010)
* simulator: color visible on background
* add design dimension info to simulator statusbar
* update preview when apply font size filter
* add info box
* preferences: check if stitch_plan is loaded
Diffstat (limited to 'lib/gui/simulator/simulator_preferences.py')
| -rw-r--r-- | lib/gui/simulator/simulator_preferences.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gui/simulator/simulator_preferences.py b/lib/gui/simulator/simulator_preferences.py index a3e23bdc..9954c8f2 100644 --- a/lib/gui/simulator/simulator_preferences.py +++ b/lib/gui/simulator/simulator_preferences.py @@ -1,6 +1,6 @@ # Authors: see git history # -# Copyright (c) 2010 Authors +# Copyright (c) 2024 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. import wx @@ -54,7 +54,7 @@ class SimulatorPreferenceDialog(wx.Dialog): def on_change(self, attribute, event): global_settings[attribute] = event.EventObject.GetValue() - if attribute == 'simulator_line_width': + if self.drawing_panel.loaded and attribute == 'simulator_line_width': self.drawing_panel.update_pen_size() self.drawing_panel.Refresh() @@ -66,6 +66,7 @@ class SimulatorPreferenceDialog(wx.Dialog): def on_cancel(self, event): global_settings['simulator_line_width'] = self.line_width_value global_settings['simulator_npp_size'] = self.npp_size_value - self.drawing_panel.update_pen_size() - self.drawing_panel.Refresh() + if self.drawing_panel.loaded: + self.drawing_panel.update_pen_size() + self.drawing_panel.Refresh() self.Destroy() |
