diff --git a/panels/base_panel.py b/panels/base_panel.py index 01564aaf..c9529bcb 100644 --- a/panels/base_panel.py +++ b/panels/base_panel.py @@ -274,6 +274,9 @@ class BasePanel(ScreenPanel): self.action_bar.remove(self.control['macros_shortcut']) self.buttons_showing['macros_shortcut'] = False + def toggle_macro_shorcut_sensitive(self, value=True): + self.control['macros_shortcut'].set_sensitive(value) + def show_printer_select(self, show=True): if show and self.buttons_showing['printer_select'] is False: self.action_bar.add(self.control['printer_select']) diff --git a/panels/gcode_macros.py b/panels/gcode_macros.py index 04a5caab..f3efc391 100644 --- a/panels/gcode_macros.py +++ b/panels/gcode_macros.py @@ -50,6 +50,10 @@ class MacroPanel(ScreenPanel): while len(self.menu) > 1: self.unload_menu() self.reload_macros() + self._screen.base_panel.toggle_macro_shorcut_sensitive(False) + + def deactivate(self): + self._screen.base_panel.toggle_macro_shorcut_sensitive(True) def add_gcode_macro(self, macro): # Support for hiding macros by name