]> git.lyx.org Git - lyx.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>
Sun, 26 Jan 2020 22:17:55 +0000 (23:17 +0100)
Since there is a margin above and below the inset, there is no problem
for putting it higher.

Fixes bug #11684.

(cherry picked from commit bf7f4d716cf0ef148495d7ecd616a1aaea57a13d)

src/mathed/InsetMathHull.cpp
status.23x

index d6d804dd8c8db02ade3927a0682a1e6f2aa47645..f22b64744dfcda93a5a76d9914a5f6f833885df5 100644 (file)
@@ -692,9 +692,12 @@ void InsetMathHull::draw(PainterInfo & pi, int x, int y) const
        }
 
        // 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() ? displayMargin() : 0;
+               pi.change_.paintCue(pi, x + 1, y + 1 - dim.asc + display_margin,
+                                   x + dim.wid, y + dim.des - display_margin);
+       }
 }
 
 
index e04e926a532a0aba6eadf6984e9bfd78c41116a0..354c5552a7010729421acb8048252c2e268a187d 100644 (file)
@@ -44,6 +44,8 @@ What's new
 
 * USER INTERFACE
 
+- Fix display glith where the change tracking cue blinks with the cursor
+  (bug 11684).
 
 * INTERNALS