Commit 88dd56a2 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from deprecated QWheelEvent::pos

parent b62d82d2
......@@ -3051,10 +3051,10 @@ void View::wheelEvent(QWheelEvent *e)
if (e->modifiers() & Qt::ControlModifier) {
if (m_AccumulatedDelta >= QWheelEvent::DefaultDeltasPerStep) {
zoomIn(e->pos(), double(Settings::zoomInStep()) / 100.0);
zoomIn(e->position(), double(Settings::zoomInStep()) / 100.0);
m_AccumulatedDelta = 0;
} else if (m_AccumulatedDelta <= -QWheelEvent::DefaultDeltasPerStep) {
zoomIn(e->pos(), (double(Settings::zoomOutStep()) / 100.0) + 1.0);
zoomIn(e->position(), (double(Settings::zoomOutStep()) / 100.0) + 1.0);
m_AccumulatedDelta = 0;
}
e->accept();
......@@ -3209,7 +3209,7 @@ void View::mouseReleaseEvent(QMouseEvent *e)
updateCursor();
}
void View::zoomIn(const QPoint &mousePos, double zoomFactor)
void View::zoomIn(const QPointF &mousePos, double zoomFactor)
{
QPointF real = toReal(mousePos);
......
......@@ -415,7 +415,7 @@ private:
* Zooms in by amount \p zoomFactor (which will zooming out if less than 1)
* from clicking at \p mousePos (in widget coordinates).
*/
void zoomIn(const QPoint &mousePos, double zoomFactor);
void zoomIn(const QPointF &mousePos, double zoomFactor);
/**
* Zooms in from having drawn \p zoomRect (which is in widget coordinates).
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment