]> git.lyx.org Git - features.git/commitdiff
Update stats display if a stat is (un)selected
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 18 Aug 2022 17:08:03 +0000 (19:08 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 18 Aug 2022 17:09:15 +0000 (19:09 +0200)
src/frontends/qt/GuiView.cpp

index edcc99983f7ede55ed8fd9ae5a100da541060f56..b87b494dac6779d8c740ac66830d38c0f0d6c31b 100644 (file)
@@ -5028,13 +5028,19 @@ bool GuiView::lfunUiToggle(string const & ui_component)
                zoom_slider_->setVisible(!zoom_slider_->isVisible());
                zoom_in_->setVisible(zoom_slider_->isVisible());
                zoom_out_->setVisible(zoom_slider_->isVisible());
-       } else if (ui_component == "statistics-w")
+       } else if (ui_component == "statistics-w") {
                word_count_enabled_ = !word_count_enabled_;
-       else if (ui_component == "statistics-cb")
+               if (statsEnabled())
+                       showStats();
+       } else if (ui_component == "statistics-cb") {
                char_count_enabled_ = !char_count_enabled_;
-       else if (ui_component == "statistics-c")
+               if (statsEnabled())
+                       showStats();
+       } else if (ui_component == "statistics-c") {
                char_nb_count_enabled_ = !char_nb_count_enabled_;
-       else if (ui_component == "frame") {
+               if (statsEnabled())
+                       showStats();
+       } else if (ui_component == "frame") {
                int const l = contentsMargins().left();
 
                //are the frames in default state?