screen: Fix problem where job_status does not update

Fixes a problem where a panel does not refresh data (such as extrusion 
rate, speed rate)
This commit is contained in:
Jordan Ruthe
2021-04-08 22:25:56 -04:00
parent bac2d9f23e
commit 02ea32506b
2 changed files with 11 additions and 0 deletions

View File

@@ -300,6 +300,9 @@ class KlipperScreen(Gtk.Window):
self.add(self.panels[panel_name].get())
self.show_all()
if hasattr(self.panels[panel_name],"process_update"):
logging.info("Debug: %s" % self.printer.get_updates())
self.panels[panel_name].process_update("notify_status_update", self.printer.get_updates())
if hasattr(self.panels[panel_name],"activate"):
self.panels[panel_name].activate()
self.show_all()
@@ -432,6 +435,9 @@ class KlipperScreen(Gtk.Window):
self._cur_panels.pop()
if len(self._cur_panels) > 0:
self.add(self.panels[self._cur_panels[-1]].get())
if hasattr(self.panels[self._cur_panels[-1]], "process_update"):
self.panels[self._cur_panels[-1]].process_update("notify_status_update",
self.printer.get_updates())
if show == True:
self.show_all()