mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 21:11:09 +08:00
Don't reset access code unless wrong password
This commit is contained in:
parent
2e64cc2f7e
commit
01bc090914
@ -1695,11 +1695,11 @@ void GUI_App::init_networking_callbacks()
|
||||
event.SetString(obj->dev_id);
|
||||
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
|
||||
} else if (state == ConnectStatus::ConnectStatusFailed) {
|
||||
obj->set_access_code("");
|
||||
obj->erase_user_access_code();
|
||||
m_device_manager->set_selected_machine("", true);
|
||||
wxString text;
|
||||
if (msg == "5") {
|
||||
obj->set_access_code("");
|
||||
obj->erase_user_access_code();
|
||||
text = wxString::Format(_L("Incorrect password"));
|
||||
wxGetApp().show_dialog(text);
|
||||
} else {
|
||||
@ -1708,9 +1708,6 @@ void GUI_App::init_networking_callbacks()
|
||||
}
|
||||
event.SetInt(-1);
|
||||
} else if (state == ConnectStatus::ConnectStatusLost) {
|
||||
obj->set_access_code("");
|
||||
obj->erase_user_access_code();
|
||||
m_device_manager->localMachineList.erase(obj->dev_id);
|
||||
m_device_manager->set_selected_machine("", true);
|
||||
event.SetInt(-1);
|
||||
BOOST_LOG_TRIVIAL(info) << "set_on_local_connect_fn: state = lost";
|
||||
|
Loading…
x
Reference in New Issue
Block a user