Issue #207: Zoom to Cursor (Zoom Anchoring)

This commit is contained in:
Jakub Melka
2024-08-31 19:25:08 +02:00
parent 2a93ca5a1f
commit b97e36ce0d
4 changed files with 32 additions and 10 deletions

View File

@ -551,7 +551,7 @@ void PDFDrawWidget::wheelEvent(QWheelEvent* event)
const PDFReal zoom = m_widget->getDrawWidgetProxy()->getZoom();
const PDFReal zoomStep = std::pow(PDFDrawWidgetProxy::ZOOM_STEP, static_cast<PDFReal>(angleDeltaY) / static_cast<PDFReal>(QWheelEvent::DefaultDeltasPerStep));
const PDFReal newZoom = zoom * zoomStep;
proxy->zoom(newZoom);
proxy->zoom(newZoom, event->position());
}
else
{