From 28da50b522342bd2b51c44b60340dce684c10d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Vigna?= Date: Thu, 22 Mar 2001 16:07:59 +0000 Subject: [PATCH] Fixed bug in reading old minipages in a depth > 0. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1806 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 3 ++- src/buffer.C | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f05a22dda4..8abe8f9b99 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,8 @@ 2001-03-22 Juergen Vigna * buffer.C (parseSingleLyXformat2Token): redone the minipage - compatibility read a bit. + compatibility read a bit and fixed bug with minipage in different + depth. 2001-03-21 José Abílio Matos diff --git a/src/buffer.C b/src/buffer.C index ba47d0ab52..10cd887bef 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1148,6 +1148,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par, p->previous(parBeforeMinipage); parBeforeMinipage->next(p); p->next(0); + p->params.depth(parBeforeMinipage->params.depth()); parBeforeMinipage = p; } InsetMinipage * mini = new InsetMinipage; @@ -1190,6 +1191,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par, tmp->params.pextraStartMinipage(false); tmp = tmp->next(); } + depth = parBeforeMinipage->params.depth(); minipar = parBeforeMinipage = 0; } else if (!minipar && (par->params.pextraType() == LyXParagraph::PEXTRA_MINIPAGE)) @@ -1205,6 +1207,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par, p->layout = 0; p->previous(par->previous()); p->next(0); + p->params.depth(depth); + par->params.depth(0); + depth = 0; if (par->previous()) par->previous()->next(p); par->previous(0);