]> git.lyx.org Git - features.git/commitdiff
Preserve \inputencoding value when switching to non-TeX fonts.
authorGünter Milde <milde@lyx.org>
Fri, 21 Jun 2019 07:54:45 +0000 (09:54 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:33 +0000 (15:48 +0200)
With non-TeX fonts, the \inputencoding setting is overridden
by "utf8-plain" (pass-through). Keeping the old value allows
switching back to TeX fonts without the need to (re)set
the input encoding.

Also change back the GUI name of the "auto-legacy" setting
(cf. #11115).

src/frontends/qt4/GuiDocument.cpp

index 21a6948f699edd0bc0909c34fda8509d1d67733a..008d0748485c031625ae259949cb4d0e5c9bf62f 100644 (file)
@@ -967,7 +967,7 @@ GuiDocument::GuiDocument(GuiView & lv)
        langModule->languageCO->setModelColumn(0);
 
        langModule->encodingCO->addItem(qt_("Unicode (utf8)"));
-       langModule->encodingCO->addItem(qt_("Legacy (auto-selected)"));
+       langModule->encodingCO->addItem(qt_("Traditional (auto-selected)"));
        langModule->encodingCO->addItem(qt_("Custom"));
        langModule->encodingCO->setItemData(EncodingSets::unicode,
                "Select Unicode (utf8) encoding.", Qt::ToolTipRole);
@@ -3328,8 +3328,9 @@ void GuiDocument::applyView()
        // language & quotes
        switch (langModule->encodingCO->currentIndex()) {
                case EncodingSets::unicode: {
-                       bp_.inputenc = fromqstr(langModule->unicodeEncodingCO->itemData(
-                               langModule->unicodeEncodingCO->currentIndex()).toString());
+                       if (!fontModule->osFontsCB->isChecked())
+                               bp_.inputenc = fromqstr(langModule->unicodeEncodingCO->itemData(
+                                       langModule->unicodeEncodingCO->currentIndex()).toString());
                        break;
                }
                case EncodingSets::legacy: {