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:
parent
f0a154037c
commit
80f67337d8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user