From: John Levon Date: Thu, 3 Apr 2003 17:04:20 +0000 (+0000) Subject: alfredo - fix height of row after DEPM X-Git-Tag: 1.6.10~17057 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0b1da53fd3db50f9caa678e79c2fe8aea07e6ecf;p=features.git alfredo - fix height of row after DEPM git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6710 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 237cc52a67..3f907245d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-04-03 Alfredo Braunstein + + * text2.C (dEPM): fix the heigth of the next row + 2003-04-03 Alfredo Braunstein * text.C: squashed an invalid getChar requester + some ws changes diff --git a/src/text2.C b/src/text2.C index 5eefb7731e..521f221998 100644 --- a/src/text2.C +++ b/src/text2.C @@ -2235,8 +2235,9 @@ bool LyXText::deleteEmptyParagraphMechanism(LyXCursor const & old_cursor) deleted = true; if (old_cursor.row() != rows().begin()) { - const_cast(this)->postPaint(old_cursor.y() - old_cursor.row()->baseline() - - boost::prior(old_cursor.row())->height()); + RowList::iterator + prevrow = boost::prior(old_cursor.row()); + const_cast(this)->postPaint(old_cursor.y() - old_cursor.row()->baseline() - prevrow->height()); tmpcursor = cursor; cursor = old_cursor; // that undo can restore the right cursor position Paragraph * endpar = old_cursor.par()->next(); @@ -2260,13 +2261,11 @@ bool LyXText::deleteEmptyParagraphMechanism(LyXCursor const & old_cursor) * the parindent that can occur or dissappear. * The next row can change its height, if * there is another layout before */ - if (refresh_row != rows().end()) { - if (boost::next(refresh_row) != rows().end()) { - breakAgain(boost::next(refresh_row)); - updateCounters(); - } - setHeightOfRow(refresh_row); + if (boost::next(prevrow) != rows().end()) { + breakAgain(boost::next(prevrow)); + updateCounters(); } + setHeightOfRow(prevrow); } else { RowList::iterator nextrow = boost::next(old_cursor.row()); const_cast(this)->postPaint(