Le 19 octobre 2024 19:07:00 GMT+02:00, Jean-Marc Lasgouttes <lasgout...@lyx.org> a écrit : >commit c50debaffcccb4481bf440df1ab4b2d11d28a048 >Author: Jean-Marc Lasgouttes <lasgout...@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?
This is candidate for branch too. JMarc >--- > 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; -- lyx-devel mailing list lyx-devel@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-devel