From f91cd9d25523b77b0599e08709f6678327f86ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Fri, 19 Mar 2010 13:35:32 +0000 Subject: [PATCH] fix bug #6513. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33800 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 318c1a297b..dac72fe2ae 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1827,7 +1827,7 @@ void GuiDocument::updateDefaultFormat() if (!bufferview()) return; // make a copy in order to consider unapplied changes - Buffer * tmpbuf = const_cast(&buffer()); + Buffer * tmpbuf = buffer().clone(); tmpbuf->params().useXetex = outputModule->xetexCB->isChecked(); int idx = latexModule->classCO->currentIndex(); if (idx >= 0) { @@ -1847,6 +1847,8 @@ void GuiDocument::updateDefaultFormat() outputModule->defaultFormatCO->addItem(qt_((*cit)->prettyname()), QVariant(toqstr((*cit)->name()))); outputModule->defaultFormatCO->blockSignals(false); + // delete the copy + delete tmpbuf; }