macros: hide the panel if there are no elegible macros

This commit is contained in:
alfrix
2023-08-31 22:01:14 -03:00
parent e80ef7eff5
commit e01b6e5f26
5 changed files with 25 additions and 10 deletions

View File

@@ -130,11 +130,6 @@ class Panel(ScreenPanel):
def load_gcode_macros(self):
for macro in self._printer.get_gcode_macros():
macro = macro[12:].strip()
# Support for hiding macros by _
if macro.startswith("_") or macro.upper() in ('LOAD_FILAMENT', 'UNLOAD_FILAMENT'):
logging.info(f"Skipping macro {macro}")
continue
self.options[macro] = {
"name": macro,
"section": f"displayed_macros {self._screen.connected_printer}",