Alfredo Braunstein wrote:
> Lars, what should I do with this? It still works without problems for me,
> and the bug is still there in current cvs (<new doc>, a, enter, up: the
> bottom of the document raises too much, i.e. the row has wrong height).
2003-04-03 Alfredo Braunstein <[EMAIL PROTECTED]>
* text2.C (dEPM): fix the heigth of the next row
Sorry, wrong patch, see this one instead.
Alfredo
Index: text2.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/text2.C,v
retrieving revision 1.325
diff -u -p -u -r1.325 text2.C
--- text2.C 2003/04/03 01:26:02 1.325
+++ text2.C 2003/04/03 14:13:33
@@ -2235,8 +2235,9 @@ bool LyXText::deleteEmptyParagraphMechan
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::deleteEmptyParagraphMechan
* 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(