diff --git a/src/gui_2.py b/src/gui_2.py index db2c69f..4d9f6c1 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -256,9 +256,11 @@ class App: imgui.end_menu() def _gui_func(self) -> None: + pushed_prior_tint = False if self.perf_profiling_enabled: self.perf_monitor.start_component("_gui_func") if self.is_viewing_prior_session: imgui.push_style_color(imgui.Col_.window_bg, vec4(50, 40, 20)) + pushed_prior_tint = True try: self.perf_monitor.start_frame() self._autofocus_response_tab = self.controller._autofocus_response_tab @@ -761,7 +763,7 @@ class App: import traceback traceback.print_exc() - if self.is_viewing_prior_session: + if pushed_prior_tint: imgui.pop_style_color() if self.perf_profiling_enabled: self.perf_monitor.end_component("_gui_func")