Fix bug #6193: Crash when navigating away from an empty super/subscript.

I still don't know why it is that bad that this call is made below, but this seems to fix the problem.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31758 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-10-27 00:11:56 +00:00
parent 6e8312d1a4
commit d9ab7302a6

View File

@ -2284,6 +2284,8 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
// persistent selection
cap::saveSelection(cursor());
d->cursor_.macroModeClose();
// Has the cursor just left the inset?
bool leftinset = (&d->cursor_.inset() != &cur.inset());
if (leftinset)
@ -2299,7 +2301,6 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
bool update = leftinset;
if (!do_selection && d->cursor_.inTexted())
update |= checkDepm(cur, d->cursor_);
d->cursor_.macroModeClose();
d->cursor_.resetAnchor();
d->cursor_.setCursor(cur);