mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-26 23:29:38 -05:00
feat: Python Plugins
This commit is contained in:
183 files changed
+49955
-2120
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user