Fix bug 2485 and crash on middle mouse paste on math

* math_nestinset.C
	(MathNestInset::lfunMousePress): handle middle mouse here, use
	editXY, not setScreenPos
	(MathNestInset::lfunMouseRelease): don't handle here



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13612 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2006-04-09 07:06:57 +00:00
parent 2b82051a81
commit e977a3e509

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