]> git.lyx.org Git - features.git/commitdiff
alfredo - fix height of row after DEPM
authorJohn Levon <levon@movementarian.org>
Thu, 3 Apr 2003 17:04:20 +0000 (17:04 +0000)
committerJohn Levon <levon@movementarian.org>
Thu, 3 Apr 2003 17:04:20 +0000 (17:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6710 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text2.C

index 237cc52a676f2fabec7221492e9f70a1a760cd84..3f907245d986912e5829e61d8f91449e2ccf14fe 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-03  Alfredo Braunstein  <abraunst@libero.it>
+
+       * text2.C (dEPM): fix the heigth of the next row
+
 2003-04-03  Alfredo Braunstein  <abraunst@libero.it>
 
        * text.C: squashed an invalid getChar requester + some ws changes
index 5eefb7731e57cd7c2b3bb8a62ec93bed69b735d7..521f2219981f57e0512a97ce14e4ded6e8e59e09 100644 (file)
@@ -2235,8 +2235,9 @@ bool LyXText::deleteEmptyParagraphMechanism(LyXCursor const & old_cursor)
                deleted = true;
 
                if (old_cursor.row() != rows().begin()) {
-                       const_cast<LyXText *>(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<LyXText *>(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<LyXText *>(this)->postPaint(