]> git.lyx.org Git - lyx.git/commitdiff
Fix regression introduced via #12819.
authorPavel Sanda <sanda@lyx.org>
Mon, 19 Aug 2024 20:03:16 +0000 (22:03 +0200)
committerPavel Sanda <sanda@lyx.org>
Mon, 19 Aug 2024 20:03:16 +0000 (22:03 +0200)
We will mark buffer as modified only in case of removal,
not when just externally modified.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg222715.html

src/Buffer.cpp

index 35b45202d128b7e78225f17cbaf0be82718e5120..cdbfe5f0e229ca06a9fe84d5d42c930f5460f995 100644 (file)
@@ -5667,7 +5667,6 @@ void Buffer::Impl::fileExternallyModified(bool const exists)
                       "checksum unchanged: " << filename);
                return;
        }
-       lyx_clean = false;
        // If the file has been deleted, only mark the file as dirty since it is
        // pointless to prompt for reloading. If later a file is moved into this
        // location, then the externally modified warning will appear then.
@@ -5678,6 +5677,7 @@ void Buffer::Impl::fileExternallyModified(bool const exists)
        if (wa_ && wa_->unhide(owner_)) {
                wa_->updateTitles();
                if (!exists) {
+                       lyx_clean = false;
                        frontend::Alert::warning(
                                _("File deleted from disk"),
                                bformat(_("The file\n  %1$s\n"