base_panel: simplify action bar buttons enable-disable

This commit is contained in:
alfrix
2022-11-21 08:50:12 -03:00
parent 7b7c3838fc
commit d0d79a64df
29 changed files with 67 additions and 73 deletions

View File

@@ -16,8 +16,8 @@ def create_panel(*args):
class ExtrudePanel(ScreenPanel):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
def __init__(self, screen, title):
super().__init__(screen, title)
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
macros = self._screen.printer.get_gcode_macros()
self.load_filament = any("LOAD_FILAMENT" in macro.upper() for macro in macros)