[LyX/master] Do not update statistics when not requested.
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Sat Oct 19 17:07:00 UTC 2024
commit c50debaffcccb4481bf440df1ab4b2d11d28a048
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Thu Oct 17 10:50:34 2024 +0200
Do not update statistics when not requested.
If the user decides not to display statistics in the status bar, why
do the computation at all?
---
src/frontends/qt/GuiView.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 90c662758f..ae2a604b22 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1482,7 +1482,8 @@ void GuiView::showStats()
// Don't attempt to calculate stats if
// the buffer is busy as this might crash (#12935)
Statistics & statistics = buf->statistics();
- if (!busy() && !bv->busy())
+ if (!busy() && !bv->busy()
+ && (word_count_enabled_ || char_count_enabled_ || char_nb_count_enabled_))
statistics.update(cur);
QStringList stats;
More information about the lyx-cvs
mailing list