FIX: load_ams_list for initial select machine

Change-Id: I87ffa52ffb207b850156866f03bb54eb9852ee42
This commit is contained in:
chunmao.guo authored and Lane.Wei committed 2023-02-24 17:44:15 +08:00
1 parent bbc211d983
commit a48451df35
3 files changed
+6 -1

No files matched your search

+2 -1
View File
@@ -1770,7 +1770,8 @@ void GUI_App::init_networking_callbacks()
obj->is_ams_need_update = false;
obj->parse_json(msg);
if (this->m_device_manager->get_selected_machine() == obj && obj->is_ams_need_update) {
auto sel = this->m_device_manager->get_selected_machine();
if ((sel == obj || sel == nullptr) && obj->is_ams_need_update) {
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj->amsList);
}
}