Fix that `_drop_physics_mouseover` only happens when necessary
Previously the call was executed every time, because in the
`_drop_mouse_over();` a few lines above, `gui.mouse_over = nullptr;`
was set.
(cherry picked from commit 37a96d3957
)
This commit is contained in:
parent
69948f7489
commit
4e84660b50
|
@ -1875,13 +1875,13 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (over != gui.mouse_over) {
|
if (over != gui.mouse_over) {
|
||||||
|
if (!gui.mouse_over) {
|
||||||
|
_drop_physics_mouseover();
|
||||||
|
}
|
||||||
_drop_mouse_over();
|
_drop_mouse_over();
|
||||||
_gui_cancel_tooltip();
|
_gui_cancel_tooltip();
|
||||||
|
|
||||||
if (over) {
|
if (over) {
|
||||||
if (!gui.mouse_over) {
|
|
||||||
_drop_physics_mouseover();
|
|
||||||
}
|
|
||||||
_gui_call_notification(over, Control::NOTIFICATION_MOUSE_ENTER);
|
_gui_call_notification(over, Control::NOTIFICATION_MOUSE_ENTER);
|
||||||
gui.mouse_over = over;
|
gui.mouse_over = over;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue