mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
remove stuff from LyXText::checkParagraph() I don't understand
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7391 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3fae1f4503
commit
f8d90604b9
55
src/text2.C
55
src/text2.C
@ -1456,57 +1456,9 @@ void LyXText::insertStringAsParagraphs(string const & str)
|
||||
|
||||
void LyXText::checkParagraph(ParagraphList::iterator pit, pos_type pos)
|
||||
{
|
||||
LyXCursor tmpcursor;
|
||||
|
||||
pos_type z;
|
||||
RowList::iterator row = getRow(pit, pos);
|
||||
RowList::iterator beg = rows().begin();
|
||||
|
||||
// is there a break one row above
|
||||
if (row != beg && boost::prior(row)->par() == row->par()) {
|
||||
z = rowBreakPoint(*boost::prior(row));
|
||||
if (z >= row->pos()) {
|
||||
// set the dimensions of the row above
|
||||
breakAgain(getRow(pit, pos));
|
||||
postPaint();
|
||||
|
||||
breakAgain(boost::prior(row));
|
||||
|
||||
// set the cursor again. Otherwise
|
||||
// dangling pointers are possible
|
||||
setCursor(cursor.par(), cursor.pos(),
|
||||
false, cursor.boundary());
|
||||
selection.cursor = cursor;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
breakAgain(row);
|
||||
postPaint();
|
||||
|
||||
// set the cursor again. Otherwise dangling pointers are possible
|
||||
// also set the selection
|
||||
|
||||
if (selection.set()) {
|
||||
tmpcursor = cursor;
|
||||
setCursorIntern(selection.cursor.par(), selection.cursor.pos(),
|
||||
false, selection.cursor.boundary());
|
||||
selection.cursor = cursor;
|
||||
setCursorIntern(selection.start.par(),
|
||||
selection.start.pos(),
|
||||
false, selection.start.boundary());
|
||||
selection.start = cursor;
|
||||
setCursorIntern(selection.end.par(),
|
||||
selection.end.pos(),
|
||||
false, selection.end.boundary());
|
||||
selection.end = cursor;
|
||||
setCursorIntern(last_sel_cursor.par(),
|
||||
last_sel_cursor.pos(),
|
||||
false, last_sel_cursor.boundary());
|
||||
last_sel_cursor = cursor;
|
||||
cursor = tmpcursor;
|
||||
}
|
||||
setCursorIntern(cursor.par(), cursor.pos(),
|
||||
false, cursor.boundary());
|
||||
setCursorIntern(cursor.par(), cursor.pos(), false, cursor.boundary());
|
||||
}
|
||||
|
||||
|
||||
@ -1521,7 +1473,6 @@ bool LyXText::updateInset(InsetOld * inset)
|
||||
}
|
||||
|
||||
// check every paragraph
|
||||
|
||||
ParagraphList::iterator par = ownerParagraphs().begin();
|
||||
ParagraphList::iterator end = ownerParagraphs().end();
|
||||
for (; par != end; ++par) {
|
||||
@ -1530,7 +1481,7 @@ bool LyXText::updateInset(InsetOld * inset)
|
||||
checkParagraph(par, pos);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user