]> git.lyx.org Git - features.git/commitdiff
Restore default output format after tex fonts switch (#8191)
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 8 Jun 2012 18:24:09 +0000 (20:24 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 8 Jun 2012 18:24:09 +0000 (20:24 +0200)
src/frontends/qt4/GuiDocument.cpp
status.20x

index e2791bc4a99c15ac48c3615ebc599618b0bda71d..b88083aa7484bf777ab6666f39abad00f363412f 100644 (file)
@@ -1644,7 +1644,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);
index a99fe7ff9f64817577143c7b0f137aba1ffd40b4..43e44292d64600a9d9123aaee0ba18da80bfa525 100644 (file)
@@ -176,9 +176,12 @@ What's new
 - Box settings dialog didn't work if you were actually inside the box 
   (bug 8124).
 
-- Mark the document modified when changing type of split index
+- Mark the document modified when changing type of split index 
   (bug 8182).
 
+- Do not lose default output format when toggling "Use Non-TeX Fonts"
+  (bug 8191).
+
 - Fix tooltip for "Use Non-TeX Fonts" (bug 7787).
 
 - Fix pasting of LATIN CAPITAL LETTER SHARP S (bug 8057).