From d6e4ad0a3581dc994ed23d46764bf95d0ab45747 Mon Sep 17 00:00:00 2001 From: alfrix Date: Sun, 23 Oct 2022 12:19:28 -0300 Subject: [PATCH] base_panel: fix macro shorcut not hiding at startup if configured to off --- panels/base_panel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panels/base_panel.py b/panels/base_panel.py index 365f604a..6198ea3e 100644 --- a/panels/base_panel.py +++ b/panels/base_panel.py @@ -65,7 +65,7 @@ class BasePanel(ScreenPanel): self.action_bar.add(self.control['home']) if len(self._config.get_printers()) > 1: self.action_bar.add(self.control['printer_select']) - self.action_bar.add(self.control['macros_shortcut']) + self.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True)) self.action_bar.add(self.control['estop']) # Titlebar @@ -267,11 +267,11 @@ class BasePanel(ScreenPanel): self.action_bar.reorder_child(self.control['macros_shortcut'], 2) else: self.action_bar.reorder_child(self.control['macros_shortcut'], 3) + self.control['macros_shortcut'].show() self.buttons_showing['macros_shortcut'] = True elif show is False and self.buttons_showing['macros_shortcut'] is True: self.action_bar.remove(self.control['macros_shortcut']) self.buttons_showing['macros_shortcut'] = False - self._screen.show_all() def show_printer_select(self, show=True): if len(self._config.get_printers()) <= 1: @@ -280,10 +280,10 @@ class BasePanel(ScreenPanel): self.action_bar.add(self.control['printer_select']) self.action_bar.reorder_child(self.control['printer_select'], 2) self.buttons_showing['printer_select'] = True + self.control['printer_select'].show() elif show is False and self.buttons_showing['printer_select']: self.action_bar.remove(self.control['printer_select']) self.buttons_showing['printer_select'] = False - self._screen.show_all() def set_title(self, title): try: