WM: Don't notify WM when file is saved as copy
When saving a copy, the active file remains unchanged so the "saved" status and window title shouldn't be updated.
This commit is contained in:
committed by
Bastien Montagne
parent
5d0894f06a
commit
d8ec92ed0b
@@ -3577,13 +3577,17 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
|
||||
bmain->has_forward_compatibility_issues = false;
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_WM | ND_FILESAVE, nullptr);
|
||||
if (wmWindowManager *wm = CTX_wm_manager(C)) {
|
||||
/* Restart auto-save timer to avoid unnecessary unexpected freezing (because of auto-save) when
|
||||
* often saving manually. */
|
||||
wm_autosave_timer_end(wm);
|
||||
wm_autosave_timer_begin(wm);
|
||||
wm->autosave_scheduled = false;
|
||||
if (!use_save_as_copy) {
|
||||
/* If saved file is the active one, notify WM so that saved status and window title can be
|
||||
* updated. */
|
||||
WM_event_add_notifier(C, NC_WM | ND_FILESAVE, nullptr);
|
||||
if (wmWindowManager *wm = CTX_wm_manager(C)) {
|
||||
/* Restart auto-save timer to avoid unnecessary unexpected freezing (because of auto-save)
|
||||
* when often saving manually. */
|
||||
wm_autosave_timer_end(wm);
|
||||
wm_autosave_timer_begin(wm);
|
||||
wm->autosave_scheduled = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_save_as && RNA_boolean_get(op->ptr, "exit")) {
|
||||
|
||||
Reference in New Issue
Block a user