Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2020-09-15 18:50:45 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-09-15 18:50:45 +0300
commit2b36e6bee6ccf5c75708b7fe3815736f426164cb (patch)
tree42de7a3ad76695f9c1860dba1a5ec25d1371d25d /source/blender/windowmanager/intern/wm_cursors.c
parentf59ce4d55c04a61a10d9e9567b53ee652972b60a (diff)
Fix T80333: cursor disappears after using navigation gizmo in editmode
Caused by rBe490dc4346db: UI: Skip unnecessary cursor setting Above commit returned early if the cursor was already set, but did this before visibility was regained, now return (still early) after setting visibility. Reviewed by @Severin in T80333
Diffstat (limited to 'source/blender/windowmanager/intern/wm_cursors.c')
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 838a1328bdc..6233df356dd 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -149,12 +149,6 @@ void WM_cursor_set(wmWindow *win, int curs)
curs = win->modalcursor;
}
- if (win->cursor == curs) {
- return; /* Cursor is already set */
- }
-
- win->cursor = curs;
-
if (curs == WM_CURSOR_NONE) {
GHOST_SetCursorVisibility(win->ghostwin, 0);
return;
@@ -162,6 +156,12 @@ void WM_cursor_set(wmWindow *win, int curs)
GHOST_SetCursorVisibility(win->ghostwin, 1);
+ if (win->cursor == curs) {
+ return; /* Cursor is already set */
+ }
+
+ win->cursor = curs;
+
if (curs < 0 || curs >= WM_CURSOR_NUM) {
BLI_assert(!"Invalid cursor number");
return;