Minor fixups thanks to Vincent.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38744 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-05-13 22:26:35 +00:00
parent 78a623e3d6
commit 605d3121f8

View File

@ -2141,20 +2141,20 @@ void GuiDocument::updateDefaultFormat()
if (!bufferview()) if (!bufferview())
return; return;
// make a copy in order to consider unapplied changes // make a copy in order to consider unapplied changes
BufferParams tmp = buffer().params(); BufferParams param_copy = buffer().params();
tmp.useNonTeXFonts = fontModule->osFontsCB->isChecked(); param_copy.useNonTeXFonts = fontModule->osFontsCB->isChecked();
int idx = latexModule->classCO->currentIndex(); int const idx = latexModule->classCO->currentIndex();
if (idx >= 0) { if (idx >= 0) {
string const classname = classes_model_.getIDString(idx); string const classname = classes_model_.getIDString(idx);
tmp.setBaseClass(classname); param_copy.setBaseClass(classname);
tmp.makeDocumentClass(); param_copy.makeDocumentClass();
} }
outputModule->defaultFormatCO->blockSignals(true); outputModule->defaultFormatCO->blockSignals(true);
outputModule->defaultFormatCO->clear(); outputModule->defaultFormatCO->clear();
outputModule->defaultFormatCO->addItem(qt_("Default"), outputModule->defaultFormatCO->addItem(qt_("Default"),
QVariant(QString("default"))); QVariant(QString("default")));
typedef vector<Format const *> Formats; typedef vector<Format const *> Formats;
Formats formats = tmp.exportableFormats(true); Formats formats = param_copy.exportableFormats(true);
Formats::const_iterator cit = formats.begin(); Formats::const_iterator cit = formats.begin();
Formats::const_iterator end = formats.end(); Formats::const_iterator end = formats.end();
for (; cit != end; ++cit) for (; cit != end; ++cit)