From c3bb45648cd95e492e4ccd5f7fed8dbf527f2498 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 8 Jan 2007 18:40:37 +0000 Subject: [PATCH] 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 --- src/insets/insettabular.C | 12 +++++++++++- src/mathed/InsetMathNest.C | 6 ++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 16c105524d..6fa185b280 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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; diff --git a/src/mathed/InsetMathNest.C b/src/mathed/InsetMathNest.C index 7d808f0528..8dfcd7161a 100644 --- a/src/mathed/InsetMathNest.C +++ b/src/mathed/InsetMathNest.C @@ -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);