]> 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>
Thu, 18 Apr 2024 14:45:58 +0000 (16:45 +0200)
commit2434a3a28848669f7d8463bef70c668e0d6e615a
tree5f2b255f6d1b1bc6d66b3231b23589e4474c1287
parentb1a0983570b01348685fbcb3070fc071f1b40c15
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.

(cherry picked from commit 08010c6a5e425b3f2d0d625536e3a571c90a0482)
src/BufferView.cpp
src/BufferView.h
src/TextMetrics.cpp
src/TextMetrics.h