Juergen Spitzmueller wrote:
> 1. open a new document
> 2. insert math inline inset (without entering content)
> 3. leave inline inset (cursor right)
> 4. press space
>
> The whole workarea gets messed up.

I tried to track down the problem. This is what I have:
In BufferView_pimpl::metrics(), line 1281:

// Take care of descent of last line
        y2 += text->getPar(pit2).descent();

getPar(pit2).descent() returns a value of 2147483668, and y2 becomes 
-2147483587. 
Before step 4 of the test scenario, y2 had a value of 41 and 
getPar(pit2).descent() returned 26 so that y2 became 67.

No idea where the absurd descent() value comes from.

Ideas?

Jürgen

P.S.: attached some debug points if someone wants to dig further 
Index: BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.576
diff -u -r1.576 BufferView_pimpl.C
--- BufferView_pimpl.C	9 Feb 2005 11:27:21 -0000	1.576
+++ BufferView_pimpl.C	13 Feb 2005 11:10:40 -0000
@@ -1270,15 +1270,20 @@
 
 	// Redo paragraphs below cursor if necessary
 	int y2 = y0;
+	lyxerr << "y2 (1): " << y2 << endl;
 	while (y2 < bv.workHeight() && pit2 < int(npit) - 1) {
 		y2 += text->getPar(pit2).descent();
+		lyxerr << "y2 (2): " << y2 << endl;
 		++pit2;
 		text->redoParagraph(pit2);
 		y2 += text->getPar(pit2).ascent();
+		lyxerr << "y2 (3): " << y2 << endl;
 	}
 
 	// Take care of descent of last line
 	y2 += text->getPar(pit2).descent();
+	lyxerr << "text->getPar(pit2).descent(): " << text->getPar(pit2).descent() << endl;
+	lyxerr << "y2 (4): " << y2 << endl;
 
 	// The coordinates of all these paragraphs are correct, cache them
 	int y = y1;

Reply via email to