Fix #94152 #97677: Fix cursor update over UI buttons

Use window->tag_cursor_refresh rather than WM_cursor_set when changing
cursor for numerical inputs. This works better since this allows a
change directly to a region-specified cursor rather than always to
default first.

Pull Request: https://projects.blender.org/blender/blender/pulls/132185
This commit is contained in:
Gerard Taulats
2024-12-27 23:50:27 +01:00
committed by Harley Acheson
parent 0de684eba6
commit 02b1e5a48f

View File

@@ -5485,7 +5485,7 @@ static void ui_numedit_set_active(uiBut *but)
if ((but->flag & UI_SELECT) == 0) {
if ((but->drawflag & UI_BUT_HOVER_LEFT) || (but->drawflag & UI_BUT_HOVER_RIGHT)) {
if (data->changed_cursor) {
WM_cursor_set(data->window, WM_CURSOR_DEFAULT);
data->window->tag_cursor_refresh = true;
data->changed_cursor = false;
}
}
@@ -8925,7 +8925,7 @@ static void button_activate_exit(
#endif
if (data->changed_cursor) {
WM_cursor_set(data->window, WM_CURSOR_DEFAULT);
win->tag_cursor_refresh = true;
}
/* redraw and refresh (for popups) */