From: Juergen Spitzmueller Date: Tue, 2 Jul 2024 09:02:36 +0000 (+0200) Subject: GuiDocument::onBufferViewChanged(): exit early if dialog is not open X-Git-Tag: 2.4.1~2 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a1141c32eb894366cd893d462328cdf0ac14f185;p=lyx.git 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) --- 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(""); }