diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-09 09:05:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 09:05:20 +0100 |
commit | a2d67c2fff58ed263be5ac5b9f1f38ed83b7f50e (patch) | |
tree | 20c7360f3d58be25d32f93d6cab89a6a81ca4f88 /scene/gui/control.cpp | |
parent | cf51b541e0edfeabda8bcd63fcefc0eccc4e6de4 (diff) | |
parent | 0fce98b4b5f568298477b175c70510924793f6b0 (diff) |
Merge pull request #58913 from Sauermann/fix-mouse-cursor-change
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index d8659b1f18..2866a5ad6c 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2663,6 +2663,11 @@ void Control::set_default_cursor_shape(CursorShape p_shape) { ERR_FAIL_INDEX(int(p_shape), CURSOR_MAX); data.default_cursor = p_shape; + + if (!is_inside_tree()) { + return; + } + get_viewport()->get_base_window()->update_mouse_cursor_shape(); } Control::CursorShape Control::get_default_cursor_shape() const { |