commit a28f1df62b8d452429aa466ffdd9fed79df1b4eb
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Wed May 21 12:27:55 2025 +0200

    Avoid (only theoretical) recursive call
---
 src/frontends/qt/GuiView.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 9104dfa6c1..b05f19b591 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1024,10 +1024,9 @@ void GuiView::saveUISettings() const
 
 void GuiView::setCurrentZoom(const int v)
 {
-    // Note that this is essentially recursive call: 
setCurrentZoom->currentZoomChanged->
-    // setValue->zoomValueChanged->zoomSliderMoved->dispatch 
LFUN_ZOOM->setCurrentZoom
-    // which exits only due to the courtesy of Qt not allowing recursive EMIT.
-       Q_EMIT currentZoomChanged(v);
+       // Avoid (only theoretical) recursive call
+       if (zoom_slider_->value() != v)
+               Q_EMIT currentZoomChanged(v);
        lyxrc.currentZoom = v;
        zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), v)));
        zoom_in_->setEnabled(currentBufferView() && v < 
zoom_slider_->maximum());
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to