From be83515f08ada8c6e999883d7adb7b0f954cf824 Mon Sep 17 00:00:00 2001 From: zkk <1007518571@qq.com> Date: Mon, 1 Jul 2024 14:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AA=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- panels/base_panel.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/panels/base_panel.py b/panels/base_panel.py index 345c7d35..249c4913 100644 --- a/panels/base_panel.py +++ b/panels/base_panel.py @@ -214,10 +214,11 @@ class BasePanel(ScreenPanel): printing = self._printer and self._printer.state in {"printing", "paused"} connected = self._printer and self._printer.state not in {'disconnected', 'startup', 'shutdown', 'error'} self.control['estop'].set_visible(printing) - self.control['move'].set_visible(not printing) - self.control['extrude'].set_visible(not printing) - self.control['files'].set_visible(not printing) - self.control['more'].set_visible(not printing) + self.control['move'].set_visible(not printing and connected) + self.control['extrude'].set_visible(not printing and connected) + self.control['files'].set_visible(not printing and connected) + self.control['more'].set_visible(not printing and connected) + self.control['home'].set_visible(connected) self.show_shortcut(connected) self.show_heaters(connected) for control in ('back', 'home'):