From: André Pönitz Date: Fri, 1 Aug 2003 12:33:42 +0000 (+0000) Subject: reuse new redoParagraph in LyXText::init X-Git-Tag: 1.6.10~16361 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=18d0f62744a06c0316ca238c005733b714841bca;p=features.git reuse new redoParagraph in LyXText::init git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7472 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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(); }