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
This commit is contained in:
Juergen Spitzmueller 2024-07-02 11:02:36 +02:00
parent 7a79a416b8
commit 574db22025

View File

@ -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("");
}