make extrude panel on pause optional

close #1113
This commit is contained in:
alfrix 2023-09-04 20:01:43 -03:00
parent ed0dbaea9e
commit 2a842839ea
2 changed files with 5 additions and 2 deletions

View File

@ -156,7 +156,7 @@ class KlipperScreenConfig:
bools = (
'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop',
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard',
'show_heater_power', "show_scroll_steppers",
'show_heater_power', "show_scroll_steppers", "auto_open_extrude"
)
strs = (
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking', 'font_size',
@ -282,6 +282,8 @@ class KlipperScreenConfig:
"value": "False", "callback": screen.reload_panels}},
{"show_scroll_steppers": {"section": "main", "name": _("Show Scrollbars Buttons"), "type": "binary",
"value": "False", "callback": screen.reload_panels}},
{"auto_open_extrude": {"section": "main", "name": _("Auto-open Extrude On Pause"), "type": "binary",
"value": "True", "callback": screen.reload_panels}},
# {"": {"section": "main", "name": _(""), "type": ""}}
]

View File

@ -662,7 +662,8 @@ class KlipperScreen(Gtk.Window):
def state_paused(self):
self.state_printing()
self.show_panel("extrude", _("Extrude"))
if self.screen._config.get_main_config().getboolean("auto_open_extrude", fallback=True):
self.show_panel("extrude", _("Extrude"))
def state_printing(self):
self.close_screensaver()