X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMath.cpp;h=e3b46b9e5caa484c9613e27ff992af3d85d8d036;hb=ad79ac406f9c8fc85880cfeb5416b0299ee9a617;hp=ba559e7eb6b4888080cc140c303526125602a65a;hpb=2acc4fc54c178744467b89b469f10bda90bb0310;p=lyx.git diff --git a/src/mathed/InsetMath.cpp b/src/mathed/InsetMath.cpp index ba559e7eb6..e3b46b9e5c 100644 --- a/src/mathed/InsetMath.cpp +++ b/src/mathed/InsetMath.cpp @@ -58,45 +58,22 @@ MathClass InsetMath::mathClass() const } -bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & ) const +InsetMath::marker_type InsetMath::marker() const { - MathRow::Element e(MathRow::INSET, mathClass()); - e.inset = this; - mrow.push_back(e); - return true; -} - -void InsetMath::metricsMarkers(MetricsInfo & mi, Dimension & dim, - int framesize) const -{ - if (!mi.base.macro_nesting) - Inset::metricsMarkers(dim, framesize); -} - - -void InsetMath::metricsMarkers2(MetricsInfo & mi, Dimension & dim, - int framesize) const -{ - if (!mi.base.macro_nesting) - Inset::metricsMarkers2(dim, framesize); -} - - -void InsetMath::drawMarkers(PainterInfo & pi, int x, int y) const -{ - if (!pi.base.macro_nesting) - Inset::drawMarkers(pi, x, y); + return nargs() > 0 ? MARKER : NO_MARKER; } -void InsetMath::drawMarkers2(PainterInfo & pi, int x, int y) const +bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & mi) const { - if (!pi.base.macro_nesting) - Inset::drawMarkers2(pi, x, y); + MathRow::Element e(mi, MathRow::INSET, mathClass()); + e.inset = this; + e.marker = mi.base.macro_nesting ? NO_MARKER : marker(); + mrow.push_back(e); + return true; } - void InsetMath::dump() const { lyxerr << "---------------------------------------------" << endl;