Skip to content

Commit

Permalink
Ensure cursor is visible when EditorSpinSlider exits the tree
Browse files Browse the repository at this point in the history
Supersedes and closes #22581.
  • Loading branch information
akien-mga committed Dec 16, 2018
1 parent 2037911 commit 74bf67c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/editor_spin_slider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 74bf67c

Please sign in to comment.