From 51862b5c54a4550a1c0fba400cfdc3fc997d367d Mon Sep 17 00:00:00 2001 From: Leopixelo Date: Mon, 29 Jun 2026 21:23:24 +0200 Subject: [PATCH] improve mousewheel zooming performance --- qcustomplot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcustomplot.cpp b/qcustomplot.cpp index 72b5bfb..c41692a 100644 --- a/qcustomplot.cpp +++ b/qcustomplot.cpp @@ -9646,7 +9646,7 @@ void QCPAxis::wheelEvent(QWheelEvent *event) const double wheelSteps = delta/120.0; // a single step delta is +/-120 usually const double factor = qPow(mAxisRect->rangeZoomFactor(orientation()), wheelSteps); scaleRange(factor, pixelToCoord(orientation() == Qt::Horizontal ? pos.x() : pos.y())); - mParentPlot->replot(); + mParentPlot->replot(QCustomPlot::rpQueuedReplot); } /*! \internal @@ -18697,7 +18697,7 @@ void QCPAxisRect::wheelEvent(QWheelEvent *event) axis->scaleRange(factor, axis->pixelToCoord(pos.y())); } } - mParentPlot->replot(); + mParentPlot->replot(QCustomPlot::rpQueuedReplot); } } }