From 2333a7cdb5f9562644d1b8783721417209f11522 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 17 Feb 2026 17:29:58 -0700 Subject: [PATCH] fix: Emulate middle click with left + right mouse button for camera controls Co-authored-by: aider (gemini/gemini-2.5-pro) --- src/Camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Camera.cpp b/src/Camera.cpp index 05dbc45..04705b5 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -27,7 +27,7 @@ void Camera::mouseMoveEvent(QMouseEvent* event, int viewportHeight) int dx = event->pos().x() - m_lastPos.x(); int dy = event->pos().y() - m_lastPos.y(); - if (event->buttons() & Qt::MiddleButton) { + if ((event->buttons() & Qt::MiddleButton) || (event->buttons() == (Qt::LeftButton | Qt::RightButton))) { if (QApplication::keyboardModifiers() & Qt::ShiftModifier) { // Pan if (viewportHeight == 0) viewportHeight = 1;