feat: Implement mouse wheel zoom to cursor position

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-17 11:36:44 -07:00
parent a66dc50daf
commit 38e931bc79
3 changed files with 26 additions and 4 deletions

View File

@@ -239,7 +239,8 @@ void ViewportWidget::mouseMoveEvent(QMouseEvent *event)
void ViewportWidget::wheelEvent(QWheelEvent *event)
{
m_camera->wheelEvent(event);
QVector3D worldPos = unproject(event->pos(), m_currentPlane);
m_camera->wheelEvent(event, worldPos);
}
void ViewportWidget::keyPressEvent(QKeyEvent *event)