FIX:FIX BUG on Buried

Change-Id: Id7a1d6c3686377c8f77b6071cc9e0754d5d31bbf
This commit is contained in:
Kunlong Ma 2023-08-01 17:01:32 +08:00 committed by Lane.Wei
parent d7e1f1d3a6
commit 93f94bf07c
1 changed files with 7 additions and 5 deletions

View File

@ -983,11 +983,13 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
update_data();
m_parent.set_as_dirty();
try {
std::string name = get_name_from_gizmo_etype(m_hover);
int count = m_gizmos[m_hover]->get_count();
NetworkAgent* agent = GUI::wxGetApp().getAgent();
if (agent) {
agent->track_update_property(name, std::to_string(count));
if ((int)m_hover >= 0 && (int)m_hover < m_gizmos.size()) {
std::string name = get_name_from_gizmo_etype(m_hover);
int count = m_gizmos[m_hover]->get_count();
NetworkAgent* agent = GUI::wxGetApp().getAgent();
if (agent) {
agent->track_update_property(name, std::to_string(count));
}
}
}
catch (...) {}