[LyX/2.4.x] GuiDocument::onBufferViewChanged(): exit early if dialog is not open
Richard Kimberly Heck
rikiheck at lyx.org
Tue Jul 2 19:14:35 UTC 2024
commit a1141c32eb894366cd893d462328cdf0ac14f185
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Tue Jul 2 11:02:36 2024 +0200
GuiDocument::onBufferViewChanged(): exit early if dialog is not open
This should fix the bug reported at
https://marc.info/?l=lyx-users&m=171957953801548&w=2
(cherry picked from commit 574db220255dcd8c83f85e30527009a9af41e21d)
---
ANNOUNCE | 2 ++
src/frontends/qt/GuiDocument.cpp | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ANNOUNCE b/ANNOUNCE
index b28b9251e6..d19f5c080d 100644
--- 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).
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 9429acd3a0..5a57ada79d 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -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("");
}
More information about the lyx-cvs
mailing list