fix: Emulate middle click with left + right mouse button for camera controls
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -27,7 +27,7 @@ void Camera::mouseMoveEvent(QMouseEvent* event, int viewportHeight)
|
|||||||
int dx = event->pos().x() - m_lastPos.x();
|
int dx = event->pos().x() - m_lastPos.x();
|
||||||
int dy = event->pos().y() - m_lastPos.y();
|
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) {
|
if (QApplication::keyboardModifiers() & Qt::ShiftModifier) {
|
||||||
// Pan
|
// Pan
|
||||||
if (viewportHeight == 0) viewportHeight = 1;
|
if (viewportHeight == 0) viewportHeight = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user