X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmathed%2FInsetMathSpace.cpp;h=0adce6ff28e3458b21813ee0c558903c9d102703;hb=a48581f48c93b3981ffd3e058f57e3ed95b53641;hp=4cf1b944f878d166e0cf7ac4ef95560289e01169;hpb=2aa930bbe8f2bf07f665b5cda70842748add271a;p=lyx.git diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index 4cf1b944f8..0adce6ff28 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -121,6 +121,7 @@ Inset * InsetMathSpace::clone() const void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const { + Changer dummy = mi.base.changeEnsureMath(); dim.asc = 4; dim.des = 0; if (space_info[space_].custom) @@ -132,6 +133,7 @@ void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const void InsetMathSpace::draw(PainterInfo & pi, int x, int y) const { + Changer dummy = pi.base.changeEnsureMath(); // Sadly, HP-UX CC can't handle that kind of initialization. // XPoint p[4] = {{++x, y-3}, {x, y}, {x+width-2, y}, {x+width-2, y-3}}; if (!space_info[space_].visible) @@ -303,8 +305,6 @@ bool InsetMathSpace::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_INSET_MODIFY: case LFUN_INSET_DIALOG_UPDATE: case LFUN_MOUSE_RELEASE: - case LFUN_MOUSE_PRESS: - case LFUN_MOUSE_MOTION: status.setEnabled(true); return true; default: @@ -330,18 +330,13 @@ void InsetMathSpace::doDispatch(Cursor & cur, FuncRequest & cmd) break; case LFUN_MOUSE_RELEASE: - if (cmd.button() == mouse_button::button1) { + if (cmd.button() == mouse_button::button1 && !cur.selection()) { showInsetDialog(&cur.bv()); break; } cur.undispatched(); break; - case LFUN_MOUSE_PRESS: - case LFUN_MOUSE_MOTION: - // eat other mouse commands - break; - default: InsetMath::doDispatch(cur, cmd); break;