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:
authorCampbell Barton <ideasman42@gmail.com>2020-04-08 06:19:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-04-08 06:22:00 +0300
commit1c5831144040709380e02fc41ddef2e10d998cda (patch)
tree98f2dc5754d661202268906f154fd98c90f41675 /source/blender/windowmanager
parent056ebb56b16b92de8a3889c530da1cf14d445170 (diff)
Fix status bar message showing saved when saving failed
Resolves the following issues: - For the first time you save a .blend file, there was no feedback. - If the file fails to save (eg "No space left on device") the status bar message replaces the error with an invalid "Saved" message. While there is a popup, the user may cancel it with mouse motion and be left with the status bar message saying the file saved. D7371 by @XDroid with edits.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index fe4305830ab..8af83aac1be 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1433,6 +1433,9 @@ static bool wm_file_write(bContext *C, const char *filepath, int fileflags, Repo
ibuf_thumb = IMB_thumb_create(filepath, THB_LARGE, THB_SOURCE_BLEND, ibuf_thumb);
}
+ /* Without this there is no feedback the file was saved. */
+ BKE_reportf(reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(filepath));
+
/* Success. */
ok = true;
}
@@ -2715,8 +2718,6 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *U
RNA_string_get(op->ptr, "filepath", path);
ret = wm_save_as_mainfile_exec(C, op);
- /* Without this there is no feedback the file was saved. */
- BKE_reportf(op->reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(path));
}
else {
WM_event_add_fileselect(C, op);