bug fix (crash when creating displayed formula after latest cursor changes)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3222 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-12-17 10:25:17 +00:00
parent 5d4b945e12
commit 8b6b06cedc

View 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");
}