mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-19 00:42:18 +00:00
Use one agent id in switch_printer_agent and restore the preset_bundle guard
Merge-resolution cleanup. The #12506 re-select path kept main's preset_bundle null check, and both select_machine calls now use effective_agent_id rather than mixing it with the equal-but-differently-named agent_info.id.
This commit is contained in:
@@ -3756,7 +3756,7 @@ void GUI_App::switch_printer_agent()
|
||||
// point at the previously active printer preset. Re-select the machine when the new
|
||||
// preset targets a different host, otherwise filament sync keeps hitting the old
|
||||
// printer. (#12506)
|
||||
if (effective_agent_id != BBL_PRINTER_AGENT_ID && m_device_manager) {
|
||||
if (effective_agent_id != BBL_PRINTER_AGENT_ID && m_device_manager && preset_bundle) {
|
||||
const std::string print_host = config.opt_string("print_host");
|
||||
if (!print_host.empty()) {
|
||||
const std::string dev_id = MachineObject::dev_id_from_address(print_host, config.opt_string("printhost_port"));
|
||||
@@ -3778,7 +3778,7 @@ void GUI_App::switch_printer_agent()
|
||||
m_agent->start_discovery(true, false);
|
||||
|
||||
// Auto-switch MachineObject (new agent has empty device_info, so always re-select)
|
||||
select_machine(agent_info.id);
|
||||
select_machine(effective_agent_id);
|
||||
}
|
||||
|
||||
void GUI_App::select_machine(const std::string& agent_id)
|
||||
|
||||
Reference in New Issue
Block a user