[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33376] trunk/blender/source/blender/ windowmanager/intern: From the todo:

Ton Roosendaal ton at blender.org
Mon Nov 29 14:14:51 CET 2010


Revision: 33376
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33376
Author:   ton
Date:     2010-11-29 14:14:51 +0100 (Mon, 29 Nov 2010)

Log Message:
-----------
>From the todo:

Save or load .blend file shows cursor 'wait' again. Is clear to indicate
a totally blocking operation.

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

Modified: trunk/blender/source/blender/windowmanager/intern/wm_cursors.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_cursors.c	2010-11-29 07:56:45 UTC (rev 33375)
+++ trunk/blender/source/blender/windowmanager/intern/wm_cursors.c	2010-11-29 13:14:51 UTC (rev 33376)
@@ -156,7 +156,7 @@
 void WM_cursor_wait(int val)
 {
 	wmWindowManager *wm= G.main->wm.first;
-	wmWindow *win= wm->windows.first; 
+	wmWindow *win= wm?wm->windows.first:NULL; 
 	
 	for(; win; win= win->next) {
 		if(val) {

Modified: trunk/blender/source/blender/windowmanager/intern/wm_files.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_files.c	2010-11-29 07:56:45 UTC (rev 33375)
+++ trunk/blender/source/blender/windowmanager/intern/wm_files.c	2010-11-29 13:14:51 UTC (rev 33376)
@@ -269,6 +269,8 @@
 	/* so we can get the error message */
 	errno = 0;
 
+	WM_cursor_wait(1);
+
 	/* first try to append data from exotic file formats... */
 	/* it throws error box when file doesnt exist and returns -1 */
 	/* note; it should set some error message somewhere... (ton) */
@@ -330,6 +332,9 @@
 		if(reports)
 			BKE_reportf(reports, RPT_ERROR, "Can't read file: \"%s\", %s.", name, errno ? strerror(errno) : "Incompatible file format");
 	}
+	
+	WM_cursor_wait(0);
+
 }
 
 
@@ -627,6 +632,9 @@
 
 	/* operator now handles overwrite checks */
 
+	/* don't forget not to return without! */
+	WM_cursor_wait(1);
+
 	if (G.fileflags & G_AUTOPACK) {
 		packAll(G.main, reports);
 	}
@@ -667,10 +675,13 @@
 	else {
 		if(ibuf_thumb) IMB_freeImBuf(ibuf_thumb);
 		if(thumb) MEM_freeN(thumb);
+		
+		WM_cursor_wait(0);
 		return -1;
 	}
 
-// XXX	waitcursor(0);
+	WM_cursor_wait(0);
+	
 	return 0;
 }
 





More information about the Bf-blender-cvs mailing list