[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46833] trunk/blender/source/blender/ windowmanager/intern/wm_files.c: fix for minor annoyance when an operator is called by another - dont add blend file to recent history .
Campbell Barton
ideasman42 at gmail.com
Mon May 21 10:24:04 CEST 2012
Revision: 46833
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46833
Author: campbellbarton
Date: 2012-05-21 08:24:03 +0000 (Mon, 21 May 2012)
Log Message:
-----------
fix for minor annoyance when an operator is called by another - dont add blend file to recent history.
this way demo-mode addon doesnt clobber the recent history with demo files its operator loads.
Modified Paths:
--------------
trunk/blender/source/blender/windowmanager/intern/wm_files.c
Modified: trunk/blender/source/blender/windowmanager/intern/wm_files.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_files.c 2012-05-21 08:10:37 UTC (rev 46832)
+++ trunk/blender/source/blender/windowmanager/intern/wm_files.c 2012-05-21 08:24:03 UTC (rev 46833)
@@ -373,6 +373,9 @@
int G_f = G.f;
ListBase wmbase;
+ /* assume automated tasks with background, don't write recent file list */
+ const int do_history = (G.background == FALSE) && (CTX_wm_manager(C)->op_undo_depth == 0);
+
/* put aside screens to match with persistent windows later */
/* also exit screens and editors */
wm_window_match_init(C, &wmbase);
@@ -400,8 +403,9 @@
if (retval != BKE_READ_FILE_FAIL) {
G.relbase_valid = 1;
- if (!G.background) /* assume automated tasks with background, don't write recent file list */
+ if (do_history) {
write_history();
+ }
}
More information about the Bf-blender-cvs
mailing list