From 18d0f62744a06c0316ca238c005733b714841bca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 1 Aug 2003 12:33:42 +0000 Subject: [PATCH] reuse new redoParagraph in LyXText::init git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7472 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text2.C | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/text2.C b/src/text2.C index a1a4327721..e5dc042c03 100644 --- a/src/text2.C +++ b/src/text2.C @@ -89,13 +89,9 @@ void LyXText::init(BufferView * bview) anchor_row_ = rows().end(); anchor_row_offset_ = 0; - ParagraphList::iterator pit = ownerParagraphs().begin(); - ParagraphList::iterator end = ownerParagraphs().end(); + current_font = getFont(ownerParagraphs().begin(), 0); - current_font = getFont(pit, 0); - - for (; pit != end; ++pit) - insertParagraph(pit, rowlist_.end()); + redoParagraphs(ownerParagraphs().begin(), ownerParagraphs().end()); setCursorIntern(rowlist_.begin()->par(), 0); selection.cursor = cursor; @@ -642,21 +638,15 @@ void LyXText::redoParagraph(ParagraphList::iterator pit) { RowList::iterator rit = firstRow(pit); - if (rit == rows().end()) { - lyxerr << "LyXText::redoParagraphs: should not happen\n"; - Assert(0); - } - - // remove it + // remove paragraph from rowlist while (rit != rows().end() && rit->par() == pit) { RowList::iterator rit2 = rit++; removeRow(rit2); } - // Reinsert the paragraph. + // reinsert the paragraph insertParagraph(pit, rit); setHeightOfRow(rows().begin()); - updateCounters(); } -- 2.39.2