mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
* math_nestinset.C (lfunMousePress): on button 2 press, paste
inner LyX selection if it exists (bug 2779). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14812 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9ee8395133
commit
c9b50bc70e
@ -1075,19 +1075,19 @@ InsetBase * MathNestInset::editXY(LCursor & cur, int x, int y)
|
||||
void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
//lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl;
|
||||
BufferView & bv = cur.bv();
|
||||
if (cmd.button() == mouse_button::button1) {
|
||||
//lyxerr << "## lfunMousePress: setting cursor to: " << cur << endl;
|
||||
cur.bv().mouseSetCursor(cur);
|
||||
}
|
||||
|
||||
if (cmd.button() == mouse_button::button2) {
|
||||
bv.mouseSetCursor(cur);
|
||||
} else if (cmd.button() == mouse_button::button2) {
|
||||
MathArray ar;
|
||||
asArray(cur.bv().owner()->gui().selection().get(), ar);
|
||||
cur.clearSelection();
|
||||
editXY(cur, cmd.x, cmd.y);
|
||||
if (cur.selection())
|
||||
asArray(bv.cursor().selectionAsString(false), ar);
|
||||
else
|
||||
asArray(bv.owner()->gui().selection().get(), ar);
|
||||
|
||||
cur.insert(ar);
|
||||
cur.bv().update();
|
||||
return;
|
||||
bv.mouseSetCursor(cur);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user