* BufferView::setCursorFromRow(): reset the Cursor to the main InsetText because that is what is expected afterwards.

This fixes this crash reported by Bennett:

I'm using pdfsync via lyxpipe to have LyX jump to where I click in the .pdf file of an open LyX document. Recently I've been getting crashes. Here's the console output:

Assertion triggered in void lyx::Text::setCursorIntern(lyx::Cursor&, lyx::pit_type, lyx::pos_type, bool, bool) by failing check "this == cur.text()" in file Text2.cpp:746


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19093 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-07-17 08:37:47 +00:00
parent 133fe199a5
commit 0b555eba87

View File

@ -1259,6 +1259,7 @@ void BufferView::setCursorFromRow(int row)
buffer_->texrow().getIdFromRow(row, tmpid, tmppos);
cursor_.reset(buffer_->inset());
if (tmpid == -1)
buffer_->text().setCursor(cursor_, 0, 0);
else