]> git.lyx.org Git - features.git/commit
Change the way scrolled rows are tracked
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 21 Feb 2019 16:52:36 +0000 (17:52 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:58 +0000 (14:39 +0200)
commite94cf78d220aa432fa959f2ad1f4f7bafc8f7bfb
tree51b71373db2a19bfe346ce3f0e5f80d14bba675c
parent7c825bf799a99d3eb4269e1107abbbc5529f1cae
Change the way scrolled rows are tracked

The goal of this commit is to simplify the logic in TextMetrics::draw.
Now, rows are repainted depending on their changed() status.

Instead of checking whether rows have been scrolled horizontally at
draw time, the code marks the row as changed when testing for
horizontal scrolling.

To this end a new method TestMetrics::setRowChanged is added, that
searches a row in the text metrics cache and marks it changed if
found.

The old code that remembered the previously scrolled row can now be
removed.
src/BufferView.cpp
src/BufferView.h
src/TextMetrics.cpp
src/TextMetrics.h