]> git.lyx.org Git - features.git/commit
Do not display caret when we're not ready
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 28 Feb 2020 14:21:40 +0000 (15:21 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 3 Mar 2020 11:30:27 +0000 (12:30 +0100)
commite99436b529fc83a5a89e3ec053f977117c339082
treea8fc1f69ac7392656b34cd23d0f711acd0b431b7
parent84e91772eb255076384c96f662b56a0fbdf635a4
Do not display caret when we're not ready

Using a dialog may trigger a redraw at times where the metrics caches
have not been updated yet. To fix this, do as in paintEvent() and
abort caret blinking if there is an open undo group.

Move the decision to skip the caret painting to showCaret(), closer to
where real work happens. hideCaret () is now an alias for
showCaret(false), which allows some code refactoring.

See also commit c7496a11b2.

Fixes bug #11763 (although it does not trigger on master).
src/frontends/qt/GuiWorkArea.cpp
src/frontends/qt/GuiWorkArea_Private.h