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 574db22025)
This commit is contained in:
Juergen Spitzmueller 2024-07-02 11:02:36 +02:00 committed by Richard Kimberly Heck
parent 4a23e7bf13
commit a1141c32eb
2 changed files with 8 additions and 2 deletions

View File

@ -97,6 +97,8 @@ What's new
- Fix crash when deleting rows or columns from table. - 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, - Fix wrong position of conversion windows of the input method (bugs 11723,
13054). 13054).

View File

@ -1869,6 +1869,10 @@ void GuiDocument::onClosing(int const id)
void GuiDocument::onBufferViewChanged() void GuiDocument::onBufferViewChanged()
{ {
if (!isVisibleView())
// dialog not open, nothing to do
return;
if (switchback_) { if (switchback_) {
// We are just switching back. Nothing to do. // We are just switching back. Nothing to do.
switchback_ = false; switchback_ = false;
@ -1903,7 +1907,7 @@ void GuiDocument::onBufferViewChanged()
} }
} }
if (isVisibleView()) // reset params if we haven't bailed out above
initialiseParams(""); initialiseParams("");
} }