[LyX/master] Correct the search name when user themes are the target

Koji Yokota <[email protected]> Wed, 15 Jul 2026 00:09:15 +0000
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 956a839ee93b933ee84d62fcbbf2ec694f24d195
Author: Koji Yokota <[email protected]>
Date:   Wed Jul 15 09:05:18 2026 +0900

    Correct the search name when user themes are the target
---
 src/frontends/qt/GuiPrefs.cpp | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index f186f0b470..175afdc6d8 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1789,13 +1789,16 @@ void PrefColors::initializeThemesLW()
 
 void PrefColors::selectCurrentTheme(QString theme_name_en, bool user_theme_only)
 {
-	// note that themesLW->findItems() matches translated theme name
-	// whereas theme_name_en contains untranslated one
-	ThemeNameDic::iterator dic_it = theme_name_dic_.find(theme_name_en);
 	QString translated_name;
-	if (dic_it != theme_name_dic_.end())
-		translated_name = dic_it->second.second;
-	else
+	if (!user_theme_only) {
+		// note that themesLW->findItems() matches translated theme name
+		// whereas theme_name_en contains untranslated one
+		ThemeNameDic::iterator dic_it = theme_name_dic_.find(theme_name_en);
+		if (dic_it != theme_name_dic_.end())
+			translated_name = dic_it->second.second;
+		else
+			translated_name = theme_name_en;
+	} else
 		translated_name = theme_name_en;
 
 	QList<QListWidgetItem *> selected_items =
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs