FIX: do not clear access code when connection lost
Change-Id: I540f26def8946b85c7cf9d2bff78c57287c911d8 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
70030768a1
commit
d20656b869
|
@ -1588,7 +1588,7 @@ void GUI_App::init_networking_callbacks()
|
||||||
if (state == ConnectStatus::ConnectStatusOk) {
|
if (state == ConnectStatus::ConnectStatusOk) {
|
||||||
obj->command_request_push_all();
|
obj->command_request_push_all();
|
||||||
obj->command_get_version();
|
obj->command_get_version();
|
||||||
} else if (state == ConnectStatus::ConnectStatusFailed || ConnectStatus::ConnectStatusLost) {
|
} else if (state == ConnectStatus::ConnectStatusFailed) {
|
||||||
obj->set_access_code("");
|
obj->set_access_code("");
|
||||||
wxString text;
|
wxString text;
|
||||||
if (msg == "5") {
|
if (msg == "5") {
|
||||||
|
@ -1598,6 +1598,9 @@ void GUI_App::init_networking_callbacks()
|
||||||
text = wxString::Format(_L("Connect %s failed! [SN:%s, code=%s]"), from_u8(obj->dev_name), obj->dev_id, msg);
|
text = wxString::Format(_L("Connect %s failed! [SN:%s, code=%s]"), from_u8(obj->dev_name), obj->dev_id, msg);
|
||||||
wxGetApp().show_dialog(text);
|
wxGetApp().show_dialog(text);
|
||||||
}
|
}
|
||||||
|
} else if (state == ConnectStatus::ConnectStatusLost) {
|
||||||
|
m_device_manager->set_selected_machine("");
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "set_on_local_connect_fn: state = lost";
|
||||||
} else {
|
} else {
|
||||||
BOOST_LOG_TRIVIAL(info) << "set_on_local_connect_fn: state = " << state;
|
BOOST_LOG_TRIVIAL(info) << "set_on_local_connect_fn: state = " << state;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue