From a1141c32eb894366cd893d462328cdf0ac14f185 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 2 Jul 2024 11:02:36 +0200 Subject: [PATCH] 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(""); } -- 2.39.5