1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Do not send mouseMoved to elements that have just unsubscribed

This commit is contained in:
Ivan Savenko 2023-06-20 18:33:32 +03:00
parent f0a154037c
commit 80f67337d8

View File

@ -301,6 +301,9 @@ void EventDispatcher::dispatchMouseMoved(const Point & position)
EventReceiversList miCopy = motioninterested;
for(auto & elem : miCopy)
{
if (!vstd::contains(motioninterested, elem))
continue;
if(elem->receiveEvent(position, AEventsReceiver::HOVER))
{
(elem)->mouseMoved(position);