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

Ensure cursor is visible when EditorSpinSlider exits the tree

Supersedes and closes #22581.
Rémi Verschelde 6 жил өмнө
parent
commit
74bf67c3a6

+ 3 - 1
editor/editor_spin_slider.cpp

@@ -155,7 +155,9 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
 
 void EditorSpinSlider::_notification(int p_what) {
 
-	if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_OUT || p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) {
+	if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_OUT ||
+			p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN ||
+			p_what == NOTIFICATION_EXIT_TREE) {
 		if (grabbing_spinner) {
 			Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
 			grabbing_spinner = false;