diff --git a/src/mesh_viewer.cpp b/src/mesh_viewer.cpp index 07105da..8662b65 100644 --- a/src/mesh_viewer.cpp +++ b/src/mesh_viewer.cpp @@ -103,7 +103,7 @@ void MeshViewer::removeMesh(const MyMesh &mesh) { void MeshViewer::mousePressEvent(QMouseEvent *e) { - if (e->button() == Qt::LeftButton) { + if (e->button() == Qt::MiddleButton) { mouse_pos = e->pos(); } } @@ -116,7 +116,7 @@ void MeshViewer::mouseReleaseEvent(QMouseEvent *e) { void MeshViewer::mouseMoveEvent(QMouseEvent *e) { - if (e->buttons() & Qt::LeftButton) { + if (e->buttons() & Qt::MiddleButton) { QPoint delta = e->pos() - mouse_pos; rot = rot_start; rot.rotate(delta.x() / 5., 0, 1, 0);