From 6a4b38c97d4b152f629a81bbe431d0175e40c806 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Fri, 3 Aug 2007 21:53:24 +0000 Subject: [PATCH] Fix some incorrect middle button paste behavior. A better fix is due after 1.5.1. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19297 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetTabular.cpp | 3 +++ src/mathed/InsetMathNest.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index d2545eea34..176033bb0e 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3189,6 +3189,9 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_MOUSE_PRESS: //lyxerr << "# InsetTabular::MousePress\n" << cur.bv().cursor() << endl; + // FIXME: the following should be replaced by a better fix + // that is already used for plain text (Text3.cpp). + cap::saveSelection(bvcur); if (cmd.button() == mouse_button::button1 || (cmd.button() == mouse_button::button3 diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 078989809e..94bec2f62e 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1153,6 +1153,9 @@ void InsetMathNest::lfunMousePress(Cursor & cur, FuncRequest & cmd) { //lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl; BufferView & bv = cur.bv(); + // FIXME: the following should be replaced by a better fix + // that is already used for plain text (Text3.cpp). + cap::saveSelection(bv.cursor()); if (cmd.button() == mouse_button::button1) { //lyxerr << "## lfunMousePress: setting cursor to: " << cur << endl; bv.mouseSetCursor(cur);