mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +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)
|
void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd)
|
||||||
{
|
{
|
||||||
//lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl;
|
//lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl;
|
||||||
|
BufferView & bv = cur.bv();
|
||||||
if (cmd.button() == mouse_button::button1) {
|
if (cmd.button() == mouse_button::button1) {
|
||||||
//lyxerr << "## lfunMousePress: setting cursor to: " << cur << endl;
|
//lyxerr << "## lfunMousePress: setting cursor to: " << cur << endl;
|
||||||
cur.bv().mouseSetCursor(cur);
|
bv.mouseSetCursor(cur);
|
||||||
}
|
} else if (cmd.button() == mouse_button::button2) {
|
||||||
|
|
||||||
if (cmd.button() == mouse_button::button2) {
|
|
||||||
MathArray ar;
|
MathArray ar;
|
||||||
asArray(cur.bv().owner()->gui().selection().get(), ar);
|
if (cur.selection())
|
||||||
cur.clearSelection();
|
asArray(bv.cursor().selectionAsString(false), ar);
|
||||||
editXY(cur, cmd.x, cmd.y);
|
else
|
||||||
|
asArray(bv.owner()->gui().selection().get(), ar);
|
||||||
|
|
||||||
cur.insert(ar);
|
cur.insert(ar);
|
||||||
cur.bv().update();
|
bv.mouseSetCursor(cur);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user