]> git.lyx.org Git - features.git/commit
Fix caret painting
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 20 Jul 2017 21:31:05 +0000 (23:31 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Feb 2018 11:29:25 +0000 (12:29 +0100)
commitef1d50207088bc40cd0fbbd27229df9e8400e932
tree903c66727a94e02386d5329ab19072f74bf0d0dd
parent7b8b3e38a1b9ff4d733266a4f3fe0f8fb041da01
Fix caret painting

The trick is to remember in BufferView what has been done at the
previous draw, so that the row that contained the caret can be
repainted if needed.

To this end, add an argument paint_caret to BufferView, although
painting the caret is not the job of the BufferView (at this point).

BufferView::needRepaint will act as an interface with
TextMetrics::drawParagraph to know whether the painting of a given
row should be forced.

Currently everything is done at the top row level, so that, if the
caret is in a large table, the whole table will have to be repainted.
It is not clear yet that this is necessary.
src/BufferView.cpp
src/BufferView.h
src/MetricsInfo.h
src/TextMetrics.cpp
src/frontends/qt4/GuiWorkArea.cpp