mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -06:00
Don't reset access code unless wrong password
This commit is contained in:
parent
2e64cc2f7e
commit
01bc090914
1 changed files with 2 additions and 5 deletions
|
@ -1695,11 +1695,11 @@ void GUI_App::init_networking_callbacks()
|
||||||
event.SetString(obj->dev_id);
|
event.SetString(obj->dev_id);
|
||||||
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
|
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
|
||||||
} else if (state == ConnectStatus::ConnectStatusFailed) {
|
} else if (state == ConnectStatus::ConnectStatusFailed) {
|
||||||
obj->set_access_code("");
|
|
||||||
obj->erase_user_access_code();
|
|
||||||
m_device_manager->set_selected_machine("", true);
|
m_device_manager->set_selected_machine("", true);
|
||||||
wxString text;
|
wxString text;
|
||||||
if (msg == "5") {
|
if (msg == "5") {
|
||||||
|
obj->set_access_code("");
|
||||||
|
obj->erase_user_access_code();
|
||||||
text = wxString::Format(_L("Incorrect password"));
|
text = wxString::Format(_L("Incorrect password"));
|
||||||
wxGetApp().show_dialog(text);
|
wxGetApp().show_dialog(text);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1708,9 +1708,6 @@ void GUI_App::init_networking_callbacks()
|
||||||
}
|
}
|
||||||
event.SetInt(-1);
|
event.SetInt(-1);
|
||||||
} else if (state == ConnectStatus::ConnectStatusLost) {
|
} 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);
|
m_device_manager->set_selected_machine("", true);
|
||||||
event.SetInt(-1);
|
event.SetInt(-1);
|
||||||
BOOST_LOG_TRIVIAL(info) << "set_on_local_connect_fn: state = lost";
|
BOOST_LOG_TRIVIAL(info) << "set_on_local_connect_fn: state = lost";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue