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:
authorTon Roosendaal <ton@blender.org>2012-12-14 22:54:22 +0400
committerTon Roosendaal <ton@blender.org>2012-12-14 22:54:22 +0400
commit073669dd8588a3b80dfffee98b4f239b4baee8c8 (patch)
treef3c460df85fe2ca04196e1f732ba047cead13152 /source/blender/windowmanager/intern/wm_files.c
parentda7ce6a3ccdee61dacd64de3df0e041edef7a321 (diff)
Bug fix, irc submitted:
On saving a first .blend after startup, the file would load back as if it was not saved (showing no name in header). The whole FILEFLAGS and G.relabase_valid and G.file_saved etc is messy. This commit fixes issues, but only adds more mess :) Will discuss a nicer implementation of all of this.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index cd5da43646c..6a84e3e4e7d 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -841,6 +841,14 @@ int wm_file_write(bContext *C, const char *target, int fileflags, ReportList *re
fileflags |= G_FILE_HISTORY; /* write file history */
+ /* first time saving */
+ /* XXX temp solution to solve bug, real fix coming (ton) */
+ if (G.main->name[0] == 0)
+ BLI_strncpy(G.main->name, filepath, sizeof(G.main->name));
+
+ /* XXX temp solution to solve bug, real fix coming (ton) */
+ G.main->recovered = 0;
+
if (BLO_write_file(CTX_data_main(C), filepath, fileflags, reports, thumb)) {
if (!(fileflags & G_FILE_SAVE_COPY)) {
G.relbase_valid = 1;