From 13434556ce3fe7a5722ff3b910726397f5271836 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 22 Oct 2002 17:31:32 +0000 Subject: [PATCH] small stuff, fix for one of the bugs John mentioned git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5475 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/formulabase.C | 2 ++ src/mathed/math_cursor.C | 9 +++++---- src/mathed/math_cursor.h | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 7fd60d3c34..358a77e6dc 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -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); diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 42a563de38..7add137ec7 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -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) { diff --git a/src/mathed/math_cursor.h b/src/mathed/math_cursor.h index 3bf90f7415..f53b79891f 100644 --- a/src/mathed/math_cursor.h +++ b/src/mathed/math_cursor.h @@ -29,7 +29,6 @@ class InsetFormulaBase; class BufferView; class MathPainterInfo; class MathUnknownInset; -class Selection; /** -- 2.39.2