Fix clicking on a mathed inset with button != 1.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4051 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-04-24 09:01:03 +00:00
parent 5456e99e72
commit d90f89db7e
2 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-04-24 Juergen Vigna <jug@sad.it>
* formulabase.C (insetButtonPress): set the mathcursor in case we
don't have one. This happens when clicking on a non locked mathed
inset with any button != 1.
2002-04-22 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* formulabase.C (localDispatch): merge the cases for

View File

@ -298,7 +298,7 @@ void InsetFormulaBase::insetButtonPress(BufferView * bv,
{
//lyxerr << "insetButtonPress: "
// << x << " " << y << " but: " << button << "\n";
#if 0
switch (button) {
default:
case 1:
@ -332,6 +332,21 @@ void InsetFormulaBase::insetButtonPress(BufferView * bv,
bv->owner()->getDialogs()->showMathPanel();
break;
}
#else
if (button == 1 || !mathcursor) {
delete mathcursor;
mathcursor = new MathCursor(this, x == 0);
metrics(bv);
first_x = x;
first_y = y;
mathcursor->selClear();
mathcursor->setPos(x + xo_, y + yo_);
}
if (button == 3) {
// launch math panel for right mouse button
bv->owner()->getDialogs()->showMathPanel();
}
#endif
bv->updateInset(this, false);
}