From 72f56d730935882b20a607154c35365afaf7b3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 31 Jan 2012 11:30:52 +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/trunk@40689 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 40 ++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 655c8262a3..2a718031a0 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -2987,31 +2987,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); - outputModule->cssCB->setChecked(bp_.html_css_as_file); - - // Fonts updateFontsize(documentClass().opt_fontsize(), bp_.fontsize); @@ -3078,6 +3060,26 @@ 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); + outputModule->cssCB->setChecked(bp_.html_css_as_file); + // paper bool const extern_geometry = documentClass().provides("geometry");