From 4f311e12f5c61c56aece10097d106a980f633c85 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 9 Jan 2024 17:09:06 +0800
Subject: [PATCH 12/17] fix(font): Fix the issue of ineffective font changes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- 修复字体更改后不生效的问题

Closes #25084
---
 plugins/appearance/pages/font/fonts.cpp | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/plugins/appearance/pages/font/fonts.cpp b/plugins/appearance/pages/font/fonts.cpp
index e722123..c1c6875 100644
--- a/plugins/appearance/pages/font/fonts.cpp
+++ b/plugins/appearance/pages/font/fonts.cpp
@@ -113,14 +113,9 @@ void Fonts::initConnections()
     connect(AppearanceGlobalInfo::instance(), &AppearanceGlobalInfo::fontChanged,
             this, &Fonts::onBackendFontChanged);
 
-    for (auto fontTypeCombos : m_fontTypeComboBoxMap.values())
+    for (auto fontTypeCombo : m_comboFontTypesMap.keys())
     {
-        auto fontNameComboBox = fontTypeCombos.first;
-        auto fontSizeComboBox = fontTypeCombos.second;
-
-        connect(fontNameComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
-                this, &Fonts::onCurrentFontFamilyChanged);
-        connect(fontSizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+        connect(fontTypeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
                 this, &Fonts::onCurrentFontFamilyChanged);
     }
 
-- 
2.33.0

