From 8160f64cae78c6d4311c514d923841d8024f7d30 Mon Sep 17 00:00:00 2001 From: Downtime Date: Sat, 17 Oct 2026 13:50:38 -0500 Subject: [PATCH] Skip the LAN reconnect after a print to the selected printer (#16271) After a print, `Plater::print_job_finished` selects the target printer again. When that printer was already the selected LAN printer, `set_selected_machine` disconnected, reset and reconnected it for no reason. Skip the call in that case. Selecting the printer by hand still reconnects it, and cloud printers are unchanged. --- src/slic3r/GUI/Plater.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 6e4d3e34e0..d395fe104c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -21178,7 +21178,12 @@ void Plater::print_job_finished(wxCommandEvent &evt) Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); if (!dev) return; - dev->set_selected_machine(evt.GetString().ToStdString()); + const std::string dev_id = evt.GetString().ToStdString(); + MachineObject* selected = dev->get_selected_machine(); + // After a LAN print, the completion event reselects the same printer. + // Keep the active session while asynchronous status traffic may still be in flight. + if (!selected || selected->get_dev_id() != dev_id || selected->connection_type() != "lan") + dev->set_selected_machine(dev_id); p->main_frame->request_select_tab(TAB_ID_MONITOR); // Selects the status page on a built Device tab; one built by the switch starts there. MonitorPanel* curr_monitor = MonitorPanel::if_built();