X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathPhantom.cpp;h=fcb0bc50f134de38b920536d871c4f86e2b6e061;hb=c41f9f7ed7a890523acd387868472080d0c68df2;hp=6d0b88df78bee5ea1582631e8095bf04b65cecfb;hpb=9a9a6a8c8f12cb8b0e713a9a1ed3c5763fa25c66;p=lyx.git diff --git a/src/mathed/InsetMathPhantom.cpp b/src/mathed/InsetMathPhantom.cpp index 6d0b88df78..fcb0bc50f1 100644 --- a/src/mathed/InsetMathPhantom.cpp +++ b/src/mathed/InsetMathPhantom.cpp @@ -38,20 +38,21 @@ Inset * InsetMathPhantom::clone() const void InsetMathPhantom::metrics(MetricsInfo & mi, Dimension & dim) const { + Changer dummy = mi.base.changeEnsureMath(); cell(0).metrics(mi, dim); - metricsMarkers(mi, dim); } void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const { + Changer dummy = pi.base.changeEnsureMath(); static int const arrow_size = 4; // We first draw the text and then an arrow ColorCode const origcol = pi.base.font.color(); if (visibleContents()) pi.base.font.setColor(Color_special); - cell(0).draw(pi, x + 1, y); + cell(0).draw(pi, x, y); if (visibleContents()) pi.base.font.setColor(origcol); Dimension const dim = dimension(*pi.base.bv); @@ -245,8 +246,6 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const else pi.pain.line(x2, y1, x2, y5, Color_added_space); } - - drawMarkers(pi, x, y); } @@ -379,8 +378,8 @@ void InsetMathPhantom::validate(LaTeXFeatures & features) const } -bool InsetMathPhantom::visibleContents() const -{ +bool InsetMathPhantom::visibleContents() const +{ return kind_ == phantom || kind_ == vphantom || kind_ == hphantom; }