Merge branch 'main' into feature/bambu_printer_housekeeping

# Conflicts:
#	tests/slic3rutils/CMakeLists.txt
This commit is contained in:
SoftFever
2026-07-18 02:08:13 +08:00
291 changed files with 59581 additions and 2738 deletions

View File

@@ -115,15 +115,11 @@ void NetworkAgent::add_cloud_agent(const std::string& provider, std::shared_ptr<
void NetworkAgent::set_printer_agent(std::shared_ptr<IPrinterAgent> printer_agent)
{
if (!printer_agent) {
return;
}
// Disconnect all callbacks from the old agent
auto old_printer_agent = m_printer_agent;
m_printer_agent = std::move(printer_agent);
m_printer_agent_id = m_printer_agent->get_agent_info().id;
m_printer_agent_id = m_printer_agent ? m_printer_agent->get_agent_info().id : "";
// Disconnect the old agent's connections/threads.
if (old_printer_agent && old_printer_agent != m_printer_agent) {
@@ -131,6 +127,9 @@ void NetworkAgent::set_printer_agent(std::shared_ptr<IPrinterAgent> printer_agen
apply_printer_callbacks(old_printer_agent, {});
}
if (!m_printer_agent)
return;
apply_printer_callbacks(m_printer_agent, m_printer_callbacks);
}