Looks like the attached patch is all that's necessaty to copy math stuff
from LyX to some external target using the mouse.
Anyway, this works only if the selected stuff is math only. (or text only,
but then all formatting is lost).
Is there a special reason that we call ascii() when creating the
selection? This way all formatting information is lost, and it's not even
possible to cut&paste between two LyX instances...
Andre'
--
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)
Index: formulabase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.220
diff -u -p -r1.220 formulabase.C
--- formulabase.C 22 Oct 2002 15:15:40 -0000 1.220
+++ formulabase.C 22 Oct 2002 15:34:54 -0000
@@ -321,6 +321,7 @@ Inset::RESULT InsetFormulaBase::lfunMous
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::localDis
fitInsetCursor(bv);
showInsetCursor(bv);
revealCodes(bv);
+ cmd.view()->stuffClipboard(mathcursor->grabSelection());
} else {
releaseMathCursor(bv);
bv->unlockInset(this);
Index: math_cursor.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.h,v
retrieving revision 1.135
diff -u -p -r1.135 math_cursor.h
--- math_cursor.h 22 Oct 2002 15:15:40 -0000 1.135
+++ math_cursor.h 22 Oct 2002 15:34:54 -0000
@@ -29,7 +29,6 @@ class InsetFormulaBase;
class BufferView;
class MathPainterInfo;
class MathUnknownInset;
-class Selection;
/**