[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34455] trunk/blender/source/blender/ windowmanager/intern/wm_cursors.c: Small fix from the todo:

Ton Roosendaal ton at blender.org
Sat Jan 22 19:00:12 CET 2011


Revision: 34455
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34455
Author:   ton
Date:     2011-01-22 18:00:11 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
Small fix from the todo:

"Modal cursors" now remain visible, until reset. These cursors
were reset already on edges. Example: 3d view toolbar, grease 
pencil. Do note, only use WM_cursor_modal() on real modal tools,
and restore it at end.

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_cursors.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_cursors.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_cursors.c	2011-01-22 15:34:20 UTC (rev 34454)
+++ trunk/blender/source/blender/windowmanager/intern/wm_cursors.c	2011-01-22 18:00:11 UTC (rev 34455)
@@ -116,6 +116,9 @@
 
 	GHOST_SetCursorVisibility(win->ghostwin, 1);
 	
+	if(curs == CURSOR_STD && win->modalcursor)
+		curs= win->modalcursor;
+	
 	win->cursor= curs;
 	
 	/* detect if we use system cursor or Blender cursor */
@@ -141,11 +144,13 @@
 {
 	if(win->lastcursor == 0)
 		win->lastcursor = win->cursor;
+	win->modalcursor = val;
 	WM_cursor_set(win, val);
 }
 
 void WM_cursor_restore(wmWindow *win)
 {
+	win->modalcursor = 0;
 	if(win->lastcursor)
 		WM_cursor_set(win, win->lastcursor);
 	win->lastcursor = 0;




More information about the Bf-blender-cvs mailing list