]> git.lyx.org Git - features.git/commitdiff
The uncontroversal part of the selection fix: Always set the X selection
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 5 Jan 2007 13:31:37 +0000 (13:31 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 5 Jan 2007 13:31:37 +0000 (13:31 +0000)
after selecting something with the mouse

* src/insets/insettabular.C
(InsetTabular::doDispatch): Set the X selection if there is a
selection after release of the left mouse button

* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): Set the X selection after double and
triple click of the left mouse button
(InsetMathNest::lfunMouseRelease): Set the X selection if there is a
selection after release of the left mouse button

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16530 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insettabular.C
src/mathed/InsetMathNest.C

index 9f9ef92e30f16a644460fb9daf0245ec1466a952..1383370f93eeb97cb0d201b20b62fff05128080d 100644 (file)
@@ -525,7 +525,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
 
        case LFUN_MOUSE_RELEASE:
                //lyxerr << "# InsetTabular::MouseRelease\n" << bvcur << endl;
-               if (cmd.button() == mouse_button::button3)
+               if (cmd.button() == mouse_button::button1) {
+                       if (bvcur.selection())
+                               theSelection().haveSelection(true);
+               } else if (cmd.button() == mouse_button::button3)
                        InsetTabularMailer(*this).showDialog(&cur.bv());
                break;
 
index 90f8fffe20ae331871b999884740a7b539b514c8..7d808f05289ebf0a6231557da2a98933b57d1d4a 100644 (file)
@@ -596,6 +596,7 @@ void InsetMathNest::doDispatch(LCursor & cur, FuncRequest & cmd)
                cur.selection() = true;
                cur.pos() = cur.lastpos();
                cur.idx() = cur.lastidx();
+               theSelection().haveSelection(true);
                break;
 
        case LFUN_PARAGRAPH_UP:
@@ -1218,6 +1219,8 @@ void InsetMathNest::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
        //lyxerr << "## lfunMouseRelease: buttons: " << cmd.button() << endl;
 
        if (cmd.button() == mouse_button::button1) {
+               if (cur.bv().cursor().selection())
+                       theSelection().haveSelection(true);
                if (!cur.selection())
                        cur.noUpdate();
                return;