diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 518c5be16..5d7644d61 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -636,6 +636,8 @@ namespace NLGUI bool _GroupSelection; bool multiSelection; uint32 _WidgetCount; + + std::set m_LoggedMissingElement; }; } diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index 95a63e5d4..5d48842a9 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -431,10 +431,23 @@ namespace NLGUI CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup]; CInterfaceElement *pIEL = rMG.Group->getElement (sEltId); 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; + } } - 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; }