]> git.lyx.org Git - features.git/commitdiff
Avoid blinking change tracking cur for math inset.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 11 Jan 2020 12:39:20 +0000 (13:39 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 11 Jan 2020 12:39:20 +0000 (13:39 +0100)
Since there is a margin above and below the inset, there is no problem
for putting it higher.

Fixes bug #11684.

src/mathed/InsetMathHull.cpp

index 9d4c0e556e31e7e8523333fbbbed4f4d818ad2fc..75e0a41f9ce83490856787b9d4dccb867f782819 100644 (file)
@@ -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);
+       }
 }