Fix macro shortcut reopening the same panel
This commit is contained in:
parent
1e4885d291
commit
2d61eba66b
@ -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'])
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user