]> git.lyx.org Git - lyx.git/commitdiff
GuiDocument::onBufferViewChanged(): exit early if dialog is not open
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 2 Jul 2024 09:02:36 +0000 (11:02 +0200)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 2 Jul 2024 19:13:47 +0000 (15:13 -0400)
This should fix the bug reported at
https://marc.info/?l=lyx-users&m=171957953801548&w=2

(cherry picked from commit 574db220255dcd8c83f85e30527009a9af41e21d)

ANNOUNCE
src/frontends/qt/GuiDocument.cpp

index b28b9251e6b94047d63eb6077e4b62678ac08b05..d19f5c080d9afe6838912850e5b338d6e229e67f 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -97,6 +97,8 @@ What's new
 
 - Fix crash when deleting rows or columns from table.
 
+- Do not ask about unapplied changes if dialog has been closed.
+
 - Fix wrong position of conversion windows of the input method (bugs 11723,
   13054).
 
index 9429acd3a0289bc420ed192653a98a9d91f3ac8e..5a57ada79d3096a8a100f5935b5874c744ddf21d 100644 (file)
@@ -1869,6 +1869,10 @@ void GuiDocument::onClosing(int const id)
 
 void GuiDocument::onBufferViewChanged()
 {
+       if (!isVisibleView())
+               // dialog not open, nothing to do
+               return;
+
        if (switchback_) {
                // We are just switching back. Nothing to do.
                switchback_ = false;
@@ -1903,8 +1907,8 @@ void GuiDocument::onBufferViewChanged()
                }
        }
 
-       if (isVisibleView())
-               initialiseParams("");
+       // reset params if we haven't bailed out above
+       initialiseParams("");
 }