[utilities/kaichat] src/widgets: Change setUseCustomFont if we accept new font size, otherwise we keep setUseCustomFont without saving it

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 5ab816dfefcc334a842e121867d39e018b64700a by Laurent Montel.
Committed on 16/08/2026 at 05:25.
Pushed by mlaurent into branch 'master'.

Change setUseCustomFont if we accept new font size, otherwise we keep setUseCustomFont without saving it

M  +3    -1    src/widgets/kaichatchangefontsizemenu.cpp

https://invent.kde.org/utilities/kaichat/-/commit/5ab816dfefcc334a842e121867d39e018b64700a

diff --git a/src/widgets/kaichatchangefontsizemenu.cpp b/src/widgets/kaichatchangefontsizemenu.cpp
index 31bdb7b..6d2e376 100644
--- a/src/widgets/kaichatchangefontsizemenu.cpp
+++ b/src/widgets/kaichatchangefontsizemenu.cpp
@@ -40,7 +40,6 @@ void KAIChatChangeFontSizeMenu::changeFontSize(int offset)
     if (TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->useCustomFont()) {
         f = TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->generalFont();
     } else {
-        TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->setUseCustomFont(true);
         f = qApp->font();
     }
     const int newSize = f.pointSize() + offset;
@@ -48,6 +47,9 @@ void KAIChatChangeFontSizeMenu::changeFontSize(int offset)
         qCDebug(KAICHAT_WIDGET_LOG) << " We can't use font size < 5 or > 30";
         return;
     }
+    if (!TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->useCustomFont()) {
+        TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->setUseCustomFont(true);
+    }
     f.setPointSize(newSize);
     TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->setGeneralFont(f);
     TextAutoGenerateText::TextAutogenerateTextGlobalConfig::self()->save();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.