Reduce logging

ryzomclassic-develop
kaetemi 5 years ago
parent be32f02a76
commit b232d0026a

@ -636,6 +636,8 @@ namespace NLGUI
bool _GroupSelection; bool _GroupSelection;
bool multiSelection; bool multiSelection;
uint32 _WidgetCount; uint32 _WidgetCount;
std::set<std::string> m_LoggedMissingElement;
}; };
} }

@ -431,10 +431,23 @@ namespace NLGUI
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup]; CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
CInterfaceElement *pIEL = rMG.Group->getElement (sEltId); CInterfaceElement *pIEL = rMG.Group->getElement (sEltId);
if (pIEL != NULL) if (pIEL != NULL)
{
#if !FINAL_VERSION
if (m_LoggedMissingElement.find(sEltId) != m_LoggedMissingElement.end())
{
m_LoggedMissingElement.erase(sEltId);
nlwarning("Previously missing UI element with Id '%s' was now found!", sEltId.c_str());
}
#endif
return pIEL; return pIEL;
}
} }
nlwarning("Could not find UI element from Id '%s'", sEltId.c_str()); if (m_LoggedMissingElement.find(sEltId) == m_LoggedMissingElement.end())
{
m_LoggedMissingElement.insert(sEltId);
nlwarning("Could not find UI element from Id '%s'...", sEltId.c_str());
}
return NULL; return NULL;
} }

Loading…
Cancel
Save