From 4e84660b50d2b8e79532c8fdf185f05f24a8c66b Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Sat, 10 Jun 2023 09:33:16 +0200 Subject: [PATCH] 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 37a96d395760a4439eb49464ec55899e3027c8a5) --- scene/main/viewport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index faa609d8477..8609b779446 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1875,13 +1875,13 @@ void Viewport::_gui_input_event(Ref p_event) { } if (over != gui.mouse_over) { + if (!gui.mouse_over) { + _drop_physics_mouseover(); + } _drop_mouse_over(); _gui_cancel_tooltip(); if (over) { - if (!gui.mouse_over) { - _drop_physics_mouseover(); - } _gui_call_notification(over, Control::NOTIFICATION_MOUSE_ENTER); gui.mouse_over = over; }