Restore default output format after tex fonts switch (#8191)

This commit is contained in:
Juergen Spitzmueller 2012-06-07 21:27:01 +02:00
parent c7549c1b54
commit a4ea17e0e9

View File

@ -1761,7 +1761,16 @@ void GuiDocument::osFontsChanged(bool nontexfonts)
{
bool const tex_fonts = !nontexfonts;
updateFontlist();
// store default format
QString const dformat = outputModule->defaultFormatCO->itemData(
outputModule->defaultFormatCO->currentIndex()).toString();
updateDefaultFormat();
// try to restore default format
int index = outputModule->defaultFormatCO->findData(dformat);
// set to default if format is not found
if (index == -1)
index = 0;
outputModule->defaultFormatCO->setCurrentIndex(index);
langModule->encodingCO->setEnabled(tex_fonts &&
!langModule->defaultencodingRB->isChecked());
langModule->defaultencodingRB->setEnabled(tex_fonts);