2
0
Эх сурвалжийг харах

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)
Markus Sauermann 2 жил өмнө
parent
commit
4e84660b50

+ 3 - 3
scene/main/viewport.cpp

@@ -1875,13 +1875,13 @@ void Viewport::_gui_input_event(Ref<InputEvent> 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;
 			}