[LyX/master] GuiDocument::onBufferViewChanged(): exit early if dialog is not open
Juergen Spitzmueller
spitz at lyx.org
Tue Jul 2 09:04:20 UTC 2024
commit 574db220255dcd8c83f85e30527009a9af41e21d
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
---
src/frontends/qt/GuiDocument.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 8c6870eb12..0404fb22c6 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -1871,6 +1871,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;
@@ -1899,8 +1903,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