Fix bug 2485 and crash on middle-mouse paste into math.

Also move reponse to middle mouse from Release to Press

        * math_nestinset.C
        (MathNestInset::lfunMousePress): Add and convert to editXY
        (MathNestInset::lfunMouseRelease): Remove


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13617 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2006-04-10 10:47:59 +00:00
parent 44aad9d818
commit df09c79544

View File

@ -621,7 +621,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_DELETE_WORD_BACKWARD:
case LFUN_BACKSPACE:
if (cur.pos() == 0)
// delete whole cell
// May affect external cell:
recordUndoInset(cur, Undo::ATOMIC);
else
recordUndo(cur, Undo::ATOMIC);
@ -630,7 +630,11 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_DELETE_WORD_FORWARD:
case LFUN_DELETE:
recordUndo(cur);
if (cur.pos() == cur.lastpos())
// May affect external cell:
recordUndoInset(cur, Undo::ATOMIC);
else
recordUndo(cur, Undo::ATOMIC);
cur.erase();
break;