]> git.lyx.org Git - lyx.git/commit
Implement quick scroll
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 24 Jul 2023 21:23:40 +0000 (23:23 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 Apr 2024 11:03:22 +0000 (13:03 +0200)
commit08010c6a5e425b3f2d0d625536e3a571c90a0482
tree80173a04c14b94842abc22c6c319ab50696a379e
parent0b6105b9245350e428c73deee88af2cd7c0d4732
Implement quick scroll

Replace flag parameter for updateMetrics() by a `force' boolean. When
it is false, the method keeps the metrics of paragraphs that are still
visible in WorkArea instead of computing everything afresh. All it has
to do is update their positions.

Add code to updateMetrics() to update the value of the anchor pit/ypos
(similar to the one in draw()).

Update processUpdateFlags() to use this when update flag is ForceDraw.

Modify scrollDocView() to just change the anchor paragraph position
when the scrolling operation would re-use some of the existing
paragraphs.

The time needed to update the metrics when scrolling with mouse in the
branch-test.lyx document is now divided by 20!

Part of bug #12297.
src/BufferView.cpp
src/BufferView.h
src/TextMetrics.cpp
src/TextMetrics.h