From b9fa237aa96bcd9172e4cb458528b1e20aa5dac7 Mon Sep 17 00:00:00 2001 From: zhouhang95 <765229842@qq.com> Date: Thu, 28 Sep 2023 11:32:21 +0800 Subject: [PATCH] fuck qt --- ui/zenoedit/viewport/cameracontrol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/zenoedit/viewport/cameracontrol.cpp b/ui/zenoedit/viewport/cameracontrol.cpp index ce7c793b71..f9427ed9d5 100644 --- a/ui/zenoedit/viewport/cameracontrol.cpp +++ b/ui/zenoedit/viewport/cameracontrol.cpp @@ -103,7 +103,7 @@ void CameraControl::fakeMousePressEvent(QMouseEvent *event) { ZASSERT_EXIT(m_zenovis); auto scene = m_zenovis->getSession()->get_scene(); - if (event->buttons() == Qt::MiddleButton) { + if (event->button() == Qt::MiddleButton) { middle_button_pressed = true; } if (scene->camera->m_need_sync) { @@ -483,7 +483,7 @@ QVariant CameraControl::hitOnFloor(float x, float y) const { } void CameraControl::fakeMouseReleaseEvent(QMouseEvent *event) { - if (event->buttons() == Qt::MiddleButton) { + if (event->button() == Qt::MiddleButton) { middle_button_pressed = false; } if (event->button() == Qt::LeftButton) {