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/branches/BRANCH_1_4_X@13620 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2006-04-10 11:10:03 +00:00
parent c9974774af
commit 0cb515b425

View File

@ -1040,7 +1040,13 @@ void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd)
}
if (cmd.button() == mouse_button::button2) {
cur.dispatch(FuncRequest(LFUN_PASTESELECTION));
MathArray ar;
asArray(cur.bv().getClipboard(), ar);
cur.clearSelection();
editXY(cur, cmd.x, cmd.y);
cur.insert(ar);
cur.bv().update();
return;
}
}
@ -1072,16 +1078,6 @@ void MathNestInset::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
return;
}
if (cmd.button() == mouse_button::button2) {
MathArray ar;
asArray(cur.bv().getClipboard(), ar);
cur.clearSelection();
cur.setScreenPos(cmd.x, cmd.y);
cur.insert(ar);
cur.bv().update();
return;
}
if (cmd.button() == mouse_button::button3) {
// try to dispatch to enclosed insets first
cur.bv().owner()->getDialogs().show("mathpanel");