ENH:display error msg when connecting to the printer fails

Change-Id: I483d6c00bdd623e34bce5b087bfbcb9a5e876fa3
This commit is contained in:
tao wang 2023-05-22 15:07:33 +08:00 committed by Lane.Wei
parent 4fd8a2b957
commit 6f2839b641
25 changed files with 378 additions and 127 deletions

View file

@ -149,7 +149,9 @@ void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
}
if (m_obj) {
m_obj->set_user_access_code(code.ToStdString());
wxGetApp().getDeviceManager()->set_selected_machine(m_obj->dev_id);
if (m_need_connect) {
wxGetApp().getDeviceManager()->set_selected_machine(m_obj->dev_id);
}
}
EndModal(wxID_OK);
}