From 59b60f5dada691c1f2ecfe4acd3b58a07b0b343e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 20 May 2019 19:55:10 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20action=20prompt:=20close=20&=20d?= =?UTF-8?q?elete=20prompt=20on=20disconnect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As mentioned in #3171 --- src/octoprint/plugins/action_command_prompt/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/octoprint/plugins/action_command_prompt/__init__.py b/src/octoprint/plugins/action_command_prompt/__init__.py index 467aac652..77f3f6e40 100644 --- a/src/octoprint/plugins/action_command_prompt/__init__.py +++ b/src/octoprint/plugins/action_command_prompt/__init__.py @@ -69,6 +69,8 @@ class ActionCommandPromptPlugin(octoprint.plugin.AssetPlugin, def on_event(self, event, payload): if event == Events.CONNECTED and self._enable == "always" and self._enable_signal_support: self._printer.commands(["{command} P1".format(command=self._command)]) + elif event == Events.DISCONNECTED: + self._close_prompt() #~ SettingsPlugin