From 29f9a3094bf08f82805cabf614a9b86534b8e29b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Wed, 1 Feb 2012 06:33:51 +0000 Subject: [PATCH] Fix bug #8013: updateDefaultFormat() checks the osFontsCB state, so the fonts UI needs to be set in advance of the output UI. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40696 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 38 ++++++++++++++++--------------- status.20x | 3 +++ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 489cf89394..7150097a89 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -2881,30 +2881,13 @@ void GuiDocument::paramsToDialog() InsetListingsParams(bp_.listings_params).separatedParams(); listingsModule->listingsED->setPlainText(toqstr(lstparams)); - // Output - // update combobox with formats - updateDefaultFormat(); - int index = outputModule->defaultFormatCO->findData(toqstr( - bp_.default_output_format)); - // set to default if format is not found - if (index == -1) - index = 0; - outputModule->defaultFormatCO->setCurrentIndex(index); + // Fonts bool const os_fonts_available = bp_.baseClass()->outputType() == lyx::LATEX && LaTeXFeatures::isAvailable("fontspec"); fontModule->osFontsCB->setEnabled(os_fonts_available); fontModule->osFontsCB->setChecked( os_fonts_available && bp_.useNonTeXFonts); - - outputModule->outputsyncCB->setChecked(bp_.output_sync); - outputModule->synccustomCB->setEditText(toqstr(bp_.output_sync_macro)); - - outputModule->mathimgSB->setValue(bp_.html_math_img_scale); - outputModule->mathoutCB->setCurrentIndex(bp_.html_math_output); - outputModule->strictCB->setChecked(bp_.html_be_strict); - - // Fonts updateFontsize(documentClass().opt_fontsize(), bp_.fontsize); @@ -2971,6 +2954,25 @@ void GuiDocument::paramsToDialog() fontModule->fontencLE->setText(toqstr(bp_.fontenc)); } + // Output + // This must be set _after_ fonts since updateDefaultFormat() + // checks osFontsCB settings. + // update combobox with formats + updateDefaultFormat(); + int index = outputModule->defaultFormatCO->findData(toqstr( + bp_.default_output_format)); + // set to default if format is not found + if (index == -1) + index = 0; + outputModule->defaultFormatCO->setCurrentIndex(index); + + outputModule->outputsyncCB->setChecked(bp_.output_sync); + outputModule->synccustomCB->setEditText(toqstr(bp_.output_sync_macro)); + + outputModule->mathimgSB->setValue(bp_.html_math_img_scale); + outputModule->mathoutCB->setCurrentIndex(bp_.html_math_output); + outputModule->strictCB->setChecked(bp_.html_be_strict); + // paper bool const extern_geometry = documentClass().provides("geometry"); diff --git a/status.20x b/status.20x index b28c3cd512..2eb729091e 100644 --- a/status.20x +++ b/status.20x @@ -187,6 +187,9 @@ What's new - Fix crash when copying table columns or rows (bug 7644). +- Correctly set the default output format in the document settings dialog + if non-tex fonts are used (bug 8013). + - Update citation labels when the BibTeX file changes (bug 7499). - Mark Buffer dirty when changing branch activation status (bug 7872). Sadly, -- 2.39.5