include tabulars and math in the "paste recent" stack

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16611 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2007-01-08 18:40:37 +00:00
parent a683072ea0
commit c3bb45648c
2 changed files with 15 additions and 3 deletions

View File

@ -501,7 +501,17 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
}
if (cmd.button() == mouse_button::button2) {
cmd = FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph");
if (bvcur.selection()) {
// See comment in LyXText::dispatch why we
// do this
// FIXME This does not use paste_tabular,
// another reason why paste_tabular should go.
cap::copySelectionToStack(bvcur);
cmd = FuncRequest(LFUN_PASTE, "0");
} else {
cmd = FuncRequest(LFUN_PRIMARY_SELECTION_PASTE,
"paragraph");
}
doDispatch(cur, cmd);
}
break;

View File

@ -1187,9 +1187,11 @@ void InsetMathNest::lfunMousePress(LCursor & cur, FuncRequest & cmd)
//cur.noUpdate();
} else if (cmd.button() == mouse_button::button2) {
MathArray ar;
if (cur.selection())
if (cur.selection()) {
// See comment in LyXText::dispatch why we do this
cap::copySelectionToStack(bv.cursor());
asArray(bv.cursor().selectionAsString(false), ar);
else
} else
asArray(theSelection().get(), ar);
cur.insert(ar);