base_panel: change how it shows controls and heaters to avoid issues
This commit is contained in:
parent
3be65a686a
commit
2fef5660cb
@ -24,7 +24,7 @@ class BasePanel(ScreenPanel):
|
||||
'back': not back,
|
||||
'macros_shortcut': False,
|
||||
'printer_select': False,
|
||||
'estop': True,
|
||||
'estop': False,
|
||||
}
|
||||
self.current_extruder = None
|
||||
# Action bar buttons
|
||||
|
@ -365,6 +365,7 @@ class JobStatusPanel(ScreenPanel):
|
||||
self.create_status_grid()
|
||||
if self.vel_timeout is None:
|
||||
self.vel_timeout = GLib.timeout_add_seconds(1, self.update_velocity)
|
||||
self._screen.base_panel_show_all()
|
||||
|
||||
def deactivate(self):
|
||||
if self.vel_timeout is not None:
|
||||
|
@ -74,6 +74,7 @@ class MainPanel(MenuPanel):
|
||||
# This has a high impact on load
|
||||
self.graph_update = GLib.timeout_add_seconds(5, self.update_graph)
|
||||
self.update_graph_visibility()
|
||||
self._screen.base_panel_show_all()
|
||||
|
||||
def deactivate(self):
|
||||
if self.graph_update:
|
||||
|
16
screen.py
16
screen.py
@ -162,8 +162,6 @@ class KlipperScreen(Gtk.Window):
|
||||
while len(self.printer_select_callbacks) > 0:
|
||||
i = self.printer_select_callbacks.pop(0)
|
||||
i()
|
||||
if self.printer.get_state() not in ["disconnected", "error", "startup", "shutdown"]:
|
||||
self.base_panel.show_heaters(True)
|
||||
self.base_panel.show_printer_select(True)
|
||||
return
|
||||
|
||||
@ -784,10 +782,6 @@ class KlipperScreen(Gtk.Window):
|
||||
self.printer_select_callbacks = [self.state_ready]
|
||||
return
|
||||
|
||||
self.base_panel.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
|
||||
self.base_panel.show_heaters(True)
|
||||
self.base_panel.show_estop(True)
|
||||
|
||||
# Do not return to main menu if completing a job, timeouts/user input will return
|
||||
if "job_status" in self._cur_panels or "main_menu" in self._cur_panels:
|
||||
return
|
||||
@ -1037,10 +1031,16 @@ class KlipperScreen(Gtk.Window):
|
||||
self.panels['splash_screen'].update_text(msg)
|
||||
return False
|
||||
|
||||
def base_panel_show_all(self):
|
||||
self.base_panel.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
|
||||
self.base_panel.show_heaters(True)
|
||||
self.base_panel.show_estop(True)
|
||||
|
||||
def printer_ready(self):
|
||||
self.close_popup_message()
|
||||
self.show_panel('main_panel', "main_menu", None, 2,
|
||||
items=self._config.get_menu_items("__main"), extrudercount=self.printer.get_extruder_count())
|
||||
self.base_panel_show_all()
|
||||
self.ws_subscribe()
|
||||
if "job_status" in self.panels:
|
||||
self.remove_subscription("job_status")
|
||||
@ -1049,9 +1049,7 @@ class KlipperScreen(Gtk.Window):
|
||||
def printer_printing(self):
|
||||
self.close_popup_message()
|
||||
self.show_panel('job_status', "job_status", _("Printing"), 2)
|
||||
self.base_panel.show_heaters(True)
|
||||
self.base_panel.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
|
||||
self.base_panel.show_estop(True)
|
||||
self.base_panel_show_all()
|
||||
for dialog in self.dialogs:
|
||||
dialog.destroy()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user