From f8d90604b99b31cf16e54da046dc3cce7ddaf1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sun, 27 Jul 2003 16:01:20 +0000 Subject: [PATCH] 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 --- src/text2.C | 55 +++-------------------------------------------------- 1 file changed, 3 insertions(+), 52 deletions(-) diff --git a/src/text2.C b/src/text2.C index 4f94b03b3d..cc2107395a 100644 --- a/src/text2.C +++ b/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 - 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); + breakAgain(getRow(pit, pos)); 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; }