ENH: add sync status for main frame

jira: none
Change-Id: Ie718baf4928d8c6cb336ea1f2a78de1e877d8624
(cherry picked from commit e4b7efada86e22438daa7000ee06629f32fc4369)
(cherry picked from commit a9e179a0abd6a6518b344de65b47db94e41b47ea)
This commit is contained in:
zhimin.zeng
2024-12-20 21:27:38 +08:00
committed by Noisyfox
parent db026b7f87
commit 6dff86bc1c
4 changed files with 162 additions and 6 deletions

View File

@@ -2815,7 +2815,7 @@ void MachineObject::set_online_state(bool on_off)
if (!on_off) m_active_state = NotActive;
}
bool MachineObject::is_info_ready()
bool MachineObject::is_info_ready() const
{
if (module_vers.empty())
return false;
@@ -5085,6 +5085,9 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
BOOST_LOG_TRIVIAL(trace) << "parse_json timeout = " << diff.count();
}
DeviceManager::update_local_machine(*this);
if (GUI::wxGetApp().plater())
GUI::wxGetApp().plater()->update_machine_sync_status();
return 0;
}