diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-03-09 01:04:56 +0100 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-03-09 07:54:03 +0100 |
commit | 0fce98b4b5f568298477b175c70510924793f6b0 (patch) | |
tree | 6367f0e7fff5501b043d92645bffa17ba316b62c /scene/gui | |
parent | f73ef03a86912dfe5c6eb73a99c3f50c144c5030 (diff) |
Update mouse cursor shape after changes
This fixes some cases where the mouse cursor shape did not change automatically, but instead required a MouseMove to update.
Diffstat (limited to 'scene/gui')
-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 { |