InsetText::fixParagraphsFont(): return early and save Font instantiation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30811 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-08-01 16:53:58 +00:00
parent a9b2b7f55d
commit 76a7314279

View File

@ -330,16 +330,17 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
void InsetText::fixParagraphsFont()
{
if (!getLayout().isPassThru())
return;
Font font(inherit_font, buffer().params().language);
if (getLayout().isPassThru()) {
font.setLanguage(latex_language);
ParagraphList::iterator par = paragraphs().begin();
ParagraphList::iterator const end = paragraphs().end();
while (par != end) {
par->resetFonts(font);
par->params().clear();
++par;
}
font.setLanguage(latex_language);
ParagraphList::iterator par = paragraphs().begin();
ParagraphList::iterator const end = paragraphs().end();
while (par != end) {
par->resetFonts(font);
par->params().clear();
++par;
}
}