[LyX/2.5.x] Change zoom from an lfun without going through the slider
Pavel Sanda <[email protected]> Mon, 15 Jun 2026 21:21:51 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 2dabb85c7743904844e751c58a5dc292b56e4bca Author: Pavel Sanda <[email protected]> Date: Mon Jun 15 23:20:58 2026 +0200 Change zoom from an lfun without going through the slider Backport 51fe34f90f4eb2, patch from Guillaume. --- src/frontends/qt/GuiView.cpp | 9 +++++---- status.25x | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 3a42afefea..4389c4b838 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -718,7 +718,6 @@ GuiView::GuiView(int id) connect(zoom_slider_, SIGNAL(sliderMoved(int)), this, SLOT(zoomSliderMoved(int))); connect(zoom_slider_, SIGNAL(valueChanged(int)), this, SLOT(zoomValueChanged(int))); - connect(this, SIGNAL(currentZoomChanged(int)), zoom_slider_, SLOT(setValue(int))); connect(zoom_in_, SIGNAL(clicked()), this, SLOT(zoomInPressed())); connect(zoom_out_, SIGNAL(clicked()), this, SLOT(zoomOutPressed())); @@ -1024,9 +1023,11 @@ void GuiView::saveUISettings() const void GuiView::setCurrentZoom(const int v) { - // Avoid (only theoretical) recursive call - if (zoom_slider_->value() != v) - Q_EMIT currentZoomChanged(v); + { + // Avoid recursive call + const QSignalBlocker blocker(zoom_slider_); + zoom_slider_->setValue(v); + } lyxrc.currentZoom = v; zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), v))); zoom_in_->setEnabled(currentBufferView() && v < zoom_slider_->maximum()); diff --git a/status.25x b/status.25x index 5d8ad627ae..d58a91a6fa 100644 --- a/status.25x +++ b/status.25x @@ -89,6 +89,9 @@ What's new - Fix sorting of colors in preferences. +- Fix zoom-in/out functions so that the inverse (e.g. with the mouse wheel) + end up at the exact same value (bug 13327). + * INTERNALS -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs