From 850958b5bc6017da66fad041dabc6ddd7b8d9f69 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Tue, 25 Jun 2024 23:46:50 +0200 Subject: 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 --- lib/gui/simulator/simulator_preferences.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/gui/simulator/simulator_preferences.py') 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() -- cgit v1.2.3