Fix bug with language changes in nested environment.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5503 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2002-10-24 17:41:55 +00:00
parent d1e1493c76
commit 605b8159d5
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-10-24 Dekel Tsur <dekelts@tau.ac.il>
* paragraph.C (TeXOnePar): Fix bug with language changes in nested
environment.
2002-10-24 Angus Leeming <leeming@lyx.org>
* lyxgluelength.h: no need to forward declare BufferParams

View File

@ -1024,8 +1024,10 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
if (language->babel() != previous_language->babel()
// check if we already put language command in TeXEnvironment()
&& !(style->isEnvironment()
&& (!previous() || previous()->layout() != layout() ||
previous()->params().depth() != params().depth())))
&& (!previous() ||
(previous()->layout() != layout() &&
previous()->getDepth() <= getDepth())
|| previous()->getDepth() < getDepth())))
{
if (!lyxrc.language_command_end.empty() &&
previous_language->babel() != doc_language->babel())