mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
tform: prevent MouseWatcherRegion leave event being fired twice
Fixes #858
This commit is contained in:
parent
3963c5de04
commit
f98c14c290
@ -726,6 +726,9 @@ clear_current_regions() {
|
|||||||
MouseWatcherRegion *old_region = (*old_ri);
|
MouseWatcherRegion *old_region = (*old_ri);
|
||||||
old_region->exit_region(param);
|
old_region->exit_region(param);
|
||||||
throw_event_pattern(_leave_pattern, old_region, ButtonHandle::none());
|
throw_event_pattern(_leave_pattern, old_region, ButtonHandle::none());
|
||||||
|
if (_preferred_region == old_region) {
|
||||||
|
_preferred_region = nullptr;
|
||||||
|
}
|
||||||
++old_ri;
|
++old_ri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user