]> git.lyx.org Git - features.git/commitdiff
bug fix (crash when creating displayed formula after latest cursor changes)
authorAndré Pönitz <poenitz@gmx.net>
Mon, 17 Dec 2001 10:25:17 +0000 (10:25 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 17 Dec 2001 10:25:17 +0000 (10:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3222 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C

index f0ef8c9c1ed6fb1e792773ecffb127684e31c4bb..e9f69acb8bf4c1e132606e346524ac0731b532ec 100644 (file)
@@ -369,11 +369,15 @@ bool positionable(MathCursor::cursor_type const & cursor,
 
 void MathCursor::setPos(int x, int y)
 {
-       dump("setPos 2");
+       dump("setPos 1");
        bool res = bruteFind(x, y,
                formula()->xlow(), formula()->xhigh(),
                formula()->ylow(), formula()->yhigh());
-       lyx::Assert(res);
+       if (!res) {
+               // this ccan happen on creation of "math-display"
+               dump("setPos 1.5");
+               first();
+       }
        dump("setPos 2");
 }