From e84d75241486a35cbe497d731b162fb6e5d3cb0c Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 14 Jul 2009 13:05:13 +0000 Subject: [PATCH] move some code fro, InsetCollapsable::read to InsetText git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30563 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetCollapsable.cpp | 10 ---------- src/insets/InsetText.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index de8561f69b..54110509b4 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -169,18 +169,8 @@ void InsetCollapsable::read(Lexer & lex) if (tmp_token == "open") status_ = Open; - // this must be set before we enter InsetText::read() InsetText::read(lex); setButtonLabel(); - - // Force default font, if so requested - // This avoids paragraphs in buffer language that would have a - // foreign language after a document language change, and it ensures - // that all new text in ERT and similar gets the "latex" language, - // since new text inherits the language from the last position of the - // existing text. As a side effect this makes us also robust against - // bugs in LyX that might lead to font changes in ERT in .lyx files. - fixParagraphsFont(); } diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 0a5cb92764..079fa34255 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -174,6 +174,14 @@ void InsetText::read(Lexer & lex) // ensure we have at least one paragraph. if (paragraphs().empty()) paragraphs().push_back(oldpar); + // Force default font, if so requested + // This avoids paragraphs in buffer language that would have a + // foreign language after a document language change, and it ensures + // that all new text in ERT and similar gets the "latex" language, + // since new text inherits the language from the last position of the + // existing text. As a side effect this makes us also robust against + // bugs in LyX that might lead to font changes in ERT in .lyx files. + fixParagraphsFont(); } -- 2.39.2