From: Jean-Marc Lasgouttes Date: Sat, 11 Jan 2020 12:39:20 +0000 (+0100) Subject: Avoid blinking change tracking cur for math inset. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1341 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=bf7f4d716cf0ef148495d7ecd616a1aaea57a13d;p=features.git Avoid blinking change tracking cur for math inset. Since there is a margin above and below the inset, there is no problem for putting it higher. Fixes bug #11684. --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 9d4c0e556e..75e0a41f9c 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -697,9 +697,12 @@ void InsetMathHull::draw(PainterInfo & pi, int x, int y) const drawMarkers(pi, x, y); // drawing change line - if (canPaintChange(*bv)) - pi.change_.paintCue(pi, x + 1, y + 1 - dim.asc, - x + dim.wid, y + dim.des); + if (canPaintChange(*bv)) { + // like in metrics() + int const display_margin = display() ? pi.base.inPixels(Length(12, Length::PT)) : 0; + pi.change_.paintCue(pi, x + 1, y + 1 - dim.asc + display_margin, + x + dim.wid, y + dim.des - display_margin); + } }