]> git.lyx.org Git - lyx.git/commit
Do not update statisitics if buffer has not changed
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Jul 2024 20:19:32 +0000 (22:19 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Jul 2024 20:38:39 +0000 (22:38 +0200)
commit0d50a8417f059f7bffc86b562817042564970c05
tree16e840e2a14685e56382e0cfdf41e3caa009da23
parent823d2900362abcc22a259cce6773d0bb9a3263dc
Do not update statisitics if buffer has not changed

Rely on the newly-introduced Buffer::id() to skip statistics
computation if the id is the same as last time. This will reduce the
annoyance of updates triggering at random times.

Take this occasion to clean code up:

- add 'skip' parameter (true by default) to Statistics::update to indicate
  that the insets that do not produce output should be skipped.

- use a trailing underscrore for private members
src/Statistics.cpp
src/Statistics.h