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
This commit is contained in:
Jürgen Spitzmüller 2012-02-01 06:33:51 +00:00
parent 64b6466e6b
commit 29f9a3094b
2 changed files with 23 additions and 18 deletions

View File

@ -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");

View File

@ -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,