commit 5e66879d980211ab10f70407e4087f934899dfcf
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Jul 20 15:44:27 2026 +0200

    Another special script font GUI fix
---
 src/frontends/qt/GuiDocument.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 9a291f2c5a..eb677a1d2f 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -3174,8 +3174,10 @@ void 
GuiDocument::updateSpecialFontsFromSelection(QTreeWidgetItem * sel, bool co
        if (!sel)
                return;
 
-       resetSpecialFont();
+       if (!embedded)
+               resetSpecialFont();
        QString const lname = sel->data(0, Qt::UserRole).toString();
+       QString const lname_gui = sel->text(0);
        QString const fam = sel->data(1, Qt::UserRole).toString();
        QString const font = sel->text(2);
        QString const scale = sel->text(3);
@@ -3193,8 +3195,8 @@ void 
GuiDocument::updateSpecialFontsFromSelection(QTreeWidgetItem * sel, bool co
                }
                fontSpecialModule->fontSpecialRomanOsfCB->setChecked(osf);
                fontSpecialModule->fontspecRomanSpecialLE->setText(opts);
-               QList<QTreeWidgetItem *> others = script ? 
fontSpecialModule->scriptFontsTW->findItems(lname, Qt::MatchExactly)
-                                                        : 
fontSpecialModule->langFontsTW->findItems(lname, Qt::MatchExactly);
+               QList<QTreeWidgetItem *> others = script ? 
fontSpecialModule->scriptFontsTW->findItems(lname_gui, Qt::MatchExactly)
+                                                        : 
fontSpecialModule->langFontsTW->findItems(lname_gui, Qt::MatchExactly);
                for (int i = 0; i < others.size(); ++i) {
                        if (embedded || others.at(i)->data(1, 
Qt::UserRole).toString() == "rm")
                                continue;
@@ -3215,8 +3217,8 @@ void 
GuiDocument::updateSpecialFontsFromSelection(QTreeWidgetItem * sel, bool co
                        fontSpecialModule->scaleSpecialSansSB->setValue(100);
                else
                        
fontSpecialModule->scaleSpecialSansSB->setValue(scale.toInt());
-               QList<QTreeWidgetItem *> others = script ? 
fontSpecialModule->scriptFontsTW->findItems(lname, Qt::MatchExactly)
-                                                        : 
fontSpecialModule->langFontsTW->findItems(lname, Qt::MatchExactly);
+               QList<QTreeWidgetItem *> others = script ? 
fontSpecialModule->scriptFontsTW->findItems(lname_gui, Qt::MatchExactly)
+                                                        : 
fontSpecialModule->langFontsTW->findItems(lname_gui, Qt::MatchExactly);
                for (int i = 0; i < others.size(); ++i) {
                        if (embedded || others.at(i)->data(1, 
Qt::UserRole).toString() == "sf")
                                continue;
@@ -3237,8 +3239,8 @@ void 
GuiDocument::updateSpecialFontsFromSelection(QTreeWidgetItem * sel, bool co
                        fontSpecialModule->scaleSpecialSansSB->setValue(100);
                else
                        
fontSpecialModule->scaleSpecialTypewriterSB->setValue(scale.toInt());
-               QList<QTreeWidgetItem *> others = script ? 
fontSpecialModule->scriptFontsTW->findItems(lname, Qt::MatchExactly)
-                                                        : 
fontSpecialModule->langFontsTW->findItems(lname, Qt::MatchExactly);
+               QList<QTreeWidgetItem *> others = script ? 
fontSpecialModule->scriptFontsTW->findItems(lname_gui, Qt::MatchExactly)
+                                                        : 
fontSpecialModule->langFontsTW->findItems(lname_gui, Qt::MatchExactly);
                for (int i = 0; i < others.size(); ++i) {
                        if (embedded || others.at(i)->data(1, 
Qt::UserRole).toString() == "tt")
                                continue;
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to