diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-16 23:20:03 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-12-16 23:20:03 +0100 |
commit | 74bf67c3a639f91263da1501fc0aaee8f1e299c5 (patch) | |
tree | 3845f772d109c13f29d3f4af0bc87dd8a6ee75e4 | |
parent | 20379119c3946096bfb0b45668034fcfa7048692 (diff) |
Ensure cursor is visible when EditorSpinSlider exits the tree
Supersedes and closes #22581.
-rw-r--r-- | editor/editor_spin_slider.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index 1b7322fd13..3d4cf41b80 100644 --- a/editor/editor_spin_slider.cpp +++ b/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; |