FIX: Remove redundant calls to set_selected_machine when disconnecting LAN

jira: [STUDIO-13828]
Change-Id: Icb2cca28cddec1e4e6b6b14b6893777db1f1a3a8
(cherry picked from commit 477fd8d3cf3adad8daaa00d95244225d9ac800b3)
This commit is contained in:
haolin.tian 2025-08-05 20:48:25 +08:00 committed by Noisyfox
parent e68daa36c9
commit fcd0a11490
2 changed files with 2 additions and 7 deletions

View file

@ -171,7 +171,7 @@ void ConnectPrinterDialog::on_input_enter(wxCommandEvent& evt)
}
void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
{
wxString code = m_textCtrl_code->GetTextCtrl()->GetValue();
for (char c : code) {
@ -182,9 +182,6 @@ void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
}
if (m_obj) {
m_obj->set_user_access_code(code.ToStdString());
if (m_need_connect) {
wxGetApp().getDeviceManager()->set_selected_machine(m_obj->get_dev_id());
}
}
EndModal(wxID_OK);
}