[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:
| Juergen Vigna <[EMAIL PROTECTED]> writes:
|
| | This seems to me very strange:
| |
| | first_phys_par = tmprow->par();
| | // find the first row of the paragraph
| | if (first_phys_par != tmprow->par())
| |
| | Well it seems Lars you didn't update this right when removing the
| | NEW_INSET stuff. The test above can go IMO!
|
| I belive that this untested patch should work:
No it won't...
This patch is a lot better:
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.134
diff -u -p -r1.134 text2.C
--- text2.C 2001/06/28 10:25:15 1.134
+++ text2.C 2001/07/03 14:13:28
@@ -761,6 +761,8 @@ void LyXText::redoHeightOfParagraph(Buff
int y = cur.y() - tmprow->baseline();
setHeightOfRow(bview, tmprow);
+
+#if 0
Paragraph * first_phys_par = tmprow->par();
// find the first row of the paragraph
@@ -776,6 +778,13 @@ void LyXText::redoHeightOfParagraph(Buff
y -= tmprow->height();
setHeightOfRow(bview, tmprow);
}
+#else
+ while (tmprow->previous() && tmprow->previous()->par() == tmprow->par()) {
+ tmprow = tmprow->previous();
+ y -= tmprow->height();
+ setHeightOfRow(bview, tmprow);
+ }
+#endif
// we can set the refreshing parameters now
status = LyXText::NEED_MORE_REFRESH;
@@ -791,6 +800,8 @@ void LyXText::redoDrawingOfParagraph(Buf
int y = cur.y() - tmprow->baseline();
setHeightOfRow(bview, tmprow);
+
+#if 0
Paragraph * first_phys_par = tmprow->par();
// find the first row of the paragraph
@@ -803,7 +814,12 @@ void LyXText::redoDrawingOfParagraph(Buf
tmprow = tmprow->previous();
y -= tmprow->height();
}
-
+#else
+ while (tmprow->previous() && tmprow->previous()->par() == tmprow->par()) {
+ tmprow = tmprow->previous();
+ y -= tmprow->height();
+ }
+#endif
// we can set the refreshing parameters now
if (status == LyXText::UNCHANGED || y < refresh_y) {
refresh_y = y;
@@ -821,13 +837,15 @@ void LyXText::redoParagraphs(BufferView
Paragraph const * endpar) const
{
Row * tmprow2;
- Paragraph * tmppar = 0, * first_phys_par = 0;
+ Paragraph * tmppar = 0;
+ Paragraph * first_phys_par = 0;
Row * tmprow = cur.row();
int y = cur.y() - tmprow->baseline();
-
- if (!tmprow->previous()){
+
+#if 0
+ if (!tmprow->previous()) {
first_phys_par = firstParagraph(); // a trick/hack for UNDO
} else {
first_phys_par = tmprow->par();
@@ -844,7 +862,10 @@ void LyXText::redoParagraphs(BufferView
y -= tmprow->height();
}
}
-
+#else
+ first_phys_par = tmprow->par();
+#endif
+
// we can set the refreshing parameters now
status = LyXText::NEED_MORE_REFRESH;
refresh_y = y;
--
Lgb