mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
reuse new redoParagraph in LyXText::init
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7472 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1751000059
commit
18d0f62744
18
src/text2.C
18
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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user