Tested by: @Langbart
Fixes: #5934

Differential Revision: https://code.wildfiregames.com/D3409
This was SVN commit r24682.
This commit is contained in:
Stan
2021-01-18 12:16:27 +00:00
parent a5bad817a0
commit 483cef87d4
+3 -1
View File
@@ -31,6 +31,7 @@
#include "scriptinterface/ScriptInterface.h"
#include "soundmanager/ISoundManager.h"
#include <algorithm>
#include <unordered_map>
const CStr IGUIObject::EventNameMouseEnter = "MouseEnter";
@@ -349,7 +350,8 @@ void IGUIObject::SetScriptHandler(const CStr& eventName, JS::HandleObject Functi
m_ScriptHandlers[eventName] = JS::Heap<JSObject*>(Function);
m_pGUI.m_EventObjects[eventName].push_back(this);
if (std::find(m_pGUI.m_EventObjects[eventName].begin(), m_pGUI.m_EventObjects[eventName].end(), this) == m_pGUI.m_EventObjects[eventName].end())
m_pGUI.m_EventObjects[eventName].emplace_back(this);
}
void IGUIObject::UnsetScriptHandler(const CStr& eventName)