From 9420de5931cb1a978eaad6d642a768b63024dbcf Mon Sep 17 00:00:00 2001 From: tao wang Date: Wed, 1 Mar 2023 12:27:41 +0800 Subject: [PATCH] FIX:fixed Lan mode printer will disconnection after connection Change-Id: Ifa81f35f4d4f58626fc74f9d092a8a1b4d10fb0d --- src/slic3r/GUI/DeviceManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 98e2610bf..926242061 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -3966,6 +3966,8 @@ bool DeviceManager::set_selected_machine(std::string dev_id) auto last_selected = my_machine_list.find(selected_machine); if (last_selected != my_machine_list.end()) { if (last_selected->second->connection_type() == "lan") { + if (last_selected->second->is_connecting()) + return false; m_agent->disconnect_printer(); } }