diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-08 06:19:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-08 06:22:00 +0300 |
commit | 1c5831144040709380e02fc41ddef2e10d998cda (patch) | |
tree | 98f2dc5754d661202268906f154fd98c90f41675 | |
parent | 056ebb56b16b92de8a3889c530da1cf14d445170 (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.
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 5 |
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); |