From: Richard Heck Date: Fri, 13 May 2011 19:40:04 +0000 (+0000) Subject: The point of the previous commit: We just need the params here, not X-Git-Tag: 2.1.0beta1~3253 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=78a623e3d6ea0d81b6b604ecb4f6c235bee2a706;p=features.git The point of the previous commit: We just need the params here, not the whole buffer. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38743 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index ba7e7a2e65..050c8d27a2 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -2141,29 +2141,26 @@ void GuiDocument::updateDefaultFormat() if (!bufferview()) return; // make a copy in order to consider unapplied changes - Buffer * tmpbuf = buffer().clone(); - tmpbuf->params().useNonTeXFonts = - fontModule->osFontsCB->isChecked(); + BufferParams tmp = buffer().params(); + tmp.useNonTeXFonts = fontModule->osFontsCB->isChecked(); int idx = latexModule->classCO->currentIndex(); if (idx >= 0) { string const classname = classes_model_.getIDString(idx); - tmpbuf->params().setBaseClass(classname); - tmpbuf->params().makeDocumentClass(); + tmp.setBaseClass(classname); + tmp.makeDocumentClass(); } outputModule->defaultFormatCO->blockSignals(true); outputModule->defaultFormatCO->clear(); outputModule->defaultFormatCO->addItem(qt_("Default"), QVariant(QString("default"))); typedef vector Formats; - Formats formats = tmpbuf->params().exportableFormats(true); + Formats formats = tmp.exportableFormats(true); Formats::const_iterator cit = formats.begin(); Formats::const_iterator end = formats.end(); for (; cit != end; ++cit) outputModule->defaultFormatCO->addItem(qt_((*cit)->prettyname()), QVariant(toqstr((*cit)->name()))); outputModule->defaultFormatCO->blockSignals(false); - // delete the copy - delete tmpbuf; }