From 017d59f57d577340c7670dd9b098ba6bc9021406 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 16 May 2023 12:23:52 -0600 Subject: [PATCH] gui_support: Resolve gauge sizing error --- resources/wx_gui/gui_support.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/wx_gui/gui_support.py b/resources/wx_gui/gui_support.py index ee587de2f..19dcc2d5b 100644 --- a/resources/wx_gui/gui_support.py +++ b/resources/wx_gui/gui_support.py @@ -46,6 +46,8 @@ class GaugePulseCallback: self.gauge_value: int = 0 self.pulse_forward: bool = True + self.max_value: int = gauge.GetRange() + self.non_metal_alternative: bool = CheckProperties(global_constants).host_is_non_metal() @@ -70,7 +72,7 @@ class GaugePulseCallback: if self.gauge_value == 0: self.pulse_forward = True - elif self.gauge_value == 100: + elif self.gauge_value == self.max_value: self.pulse_forward = False if self.pulse_forward: