]> git.lyx.org Git - features.git/commitdiff
move some code fro, InsetCollapsable::read to InsetText
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 14 Jul 2009 13:05:13 +0000 (13:05 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 14 Jul 2009 13:05:13 +0000 (13:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30563 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp
src/insets/InsetText.cpp

index de8561f69b7a5442a90964668d4d7ec5cd094c2d..54110509b4286097ad5d0fa2b90e908cf2139b8b 100644 (file)
@@ -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();
 }
 
 
index 0a5cb92764662f2f38916c41ae24fcb974a6c8d7..079fa342551e356bb845d03f27ac5cd33de37e75 100644 (file)
@@ -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();
 }