]> git.lyx.org Git - features.git/commitdiff
small stuff, fix for one of the bugs John mentioned
authorAndré Pönitz <poenitz@gmx.net>
Tue, 22 Oct 2002 17:31:32 +0000 (17:31 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 22 Oct 2002 17:31:32 +0000 (17:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5475 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C
src/mathed/math_cursor.C
src/mathed/math_cursor.h

index 7fd60d3c34e37ea45e29b4f285c797bc514d010d..358a77e6dcde87fe8701da3a380b2ea223bc84b0 100644 (file)
@@ -321,6 +321,7 @@ Inset::RESULT InsetFormulaBase::lfunMouseRelease(FuncRequest const & cmd)
        if (cmd.button() == mouse_button::button1) {
                // try to dispatch to enclosed insets first
                mathcursor->dispatch(cmd);
+               cmd.view()->stuffClipboard(mathcursor->grabSelection());
                // try to set the cursor
                //delete mathcursor;
                //mathcursor = new MathCursor(this, x == 0);
@@ -797,6 +798,7 @@ Inset::RESULT InsetFormulaBase::localDispatch(FuncRequest const & cmd)
                fitInsetCursor(bv);
                showInsetCursor(bv);
                revealCodes(bv);
+               cmd.view()->stuffClipboard(mathcursor->grabSelection());
        } else {
                releaseMathCursor(bv);
                bv->unlockInset(this);
index 42a563de38c4ed7b545d0ac965b214cbe8ec0a84..7add137ec75941fb62b3863933402b58cda88ad1 100644 (file)
@@ -415,16 +415,17 @@ void MathCursor::paste(string const & data)
 void MathCursor::backspace()
 {
        autocorrect_ = false;
-       if (pos() == 0) {
-               pullArg();
-               return;
-       }
 
        if (selection_) {
                selDel();
                return;
        }
 
+       if (pos() == 0) {
+               pullArg();
+               return;
+       }
+
        if (inMacroMode()) {
                MathUnknownInset * p = activeMacro();
                if (p->name().size() > 1) {
index 3bf90f7415a962b6c33093596b056bb622128503..f53b79891f0cffdd1d4d2ebdd206772d3fa57bc1 100644 (file)
@@ -29,7 +29,6 @@ class InsetFormulaBase;
 class BufferView;
 class MathPainterInfo;
 class MathUnknownInset;
-class Selection;
 
 /**