From: Georg Baum Date: Tue, 13 Nov 2012 20:52:38 +0000 (+0100) Subject: Add missing VCS updates after filename changes X-Git-Tag: 2.1.0beta1~1271 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=393e7924bd1d421875e020ee55c9c5c6f56f65fd;p=lyx.git Add missing VCS updates after filename changes --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 313b937940..3920f23301 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -761,7 +761,10 @@ void Buffer::setReadonly(bool const flag) void Buffer::setFileName(FileName const & fname) { + bool const changed = fname != d->filename; d->filename = fname; + if (changed) + lyxvc().file_found_hook(fname); setReadonly(d->filename.isReadOnly()); saveCheckSum(); updateTitles(); @@ -4021,6 +4024,7 @@ Buffer::ReadStatus Buffer::loadEmergency() "file."), from_utf8(d->filename.absFileName()))); } markDirty(); + lyxvc().file_found_hook(d->filename); str = _("Document was successfully recovered."); } else str = _("Document was NOT successfully recovered."); @@ -4084,6 +4088,7 @@ Buffer::ReadStatus Buffer::loadAutosave() from_utf8(d->filename.absFileName()))); } markDirty(); + lyxvc().file_found_hook(d->filename); return ReadSuccess; } return ReadAutosaveFailure;