Preserve \inputencoding value when switching to non-TeX fonts.

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).
This commit is contained in:
Günter Milde 2019-06-21 09:54:45 +02:00
parent 722ae1556d
commit 71a57e0f4d

View 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,6 +3328,7 @@ void GuiDocument::applyView()
// language & quotes
switch (langModule->encodingCO->currentIndex()) {
case EncodingSets::unicode: {
if (!fontModule->osFontsCB->isChecked())
bp_.inputenc = fromqstr(langModule->unicodeEncodingCO->itemData(
langModule->unicodeEncodingCO->currentIndex()).toString());
break;