mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
This commit is contained in:
parent
e33095f10d
commit
e84d752414
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user