commit 906a927f185c16c69bb0d3956e76f5bad4a21400
Author: Koji Yokota <[email protected]>
Date:   Fri Aug 29 09:37:07 2025 +0900

    Fix behaviour after PrefColors dialog is canceled
---
 src/frontends/qt/GuiPrefs.cpp | 9 ++++++++-
 src/frontends/qt/GuiPrefs.h   | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 48e6bbcb70..bfbb04ba5b 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1036,9 +1036,10 @@ PrefColors::PrefColors(GuiPreferences * form)
 
        // End initialization
 
+       connect(form_, SIGNAL(rejected()),
+               this, SLOT(onRejected()));
        connect(autoapplyCB, SIGNAL(toggled(bool)),
                this, SLOT(changeAutoapply()));
-
        connect(bothColorResetPB, SIGNAL(clicked()),
                this, SLOT(resetColors()));
        connect(clearFilterPB, SIGNAL(clicked()),
@@ -1122,6 +1123,12 @@ void PrefColors::updateRC(LyXRC const & rc)
 }
 
 
+void PrefColors::onRejected()
+{
+       initializeThemes();
+}
+
+
 void PrefColors::onColorsTVClicked(const QModelIndex index)
 {
        if (!index.flags().testFlag(Qt::ItemIsEnabled))
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index 09a60febaf..c4e8467c51 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -270,6 +270,7 @@ public:
 
 private Q_SLOTS:
        void onColorsTVClicked(const QModelIndex index);
+       void onRejected();
        void selectionChanged(const QItemSelection &selected,
                              const QItemSelection &deselected);
        bool resetAllColor();
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to