[Bf-blender-cvs] [50b95211bf5] master: Fix T54106: Save blend ignores 'check_existing'
Campbell Barton
noreply at git.blender.org
Tue Feb 27 03:30:53 CET 2018
Commit: 50b95211bf5263671cc577bd34fbf0ff04381aa8
Author: Campbell Barton
Date: Tue Feb 27 13:33:59 2018 +1100
Branches: master
https://developer.blender.org/rB50b95211bf5263671cc577bd34fbf0ff04381aa8
Fix T54106: Save blend ignores 'check_existing'
===================================================================
M source/blender/windowmanager/intern/wm_files.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 2d72bcf4d58..71d6ec673e6 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2144,11 +2144,13 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *U
char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
- if (BLI_exists(path)) {
+ if (RNA_boolean_get(op->ptr, "check_existing") && BLI_exists(path)) {
ret = WM_operator_confirm_message_ex(C, op, IFACE_("Save Over?"), ICON_QUESTION, path);
}
else {
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 {
More information about the Bf-blender-cvs
mailing list