change view controls
This commit is contained in:
parent
1d88c993b9
commit
0d285db809
@ -103,7 +103,7 @@ void MeshViewer::removeMesh(const MyMesh &mesh) {
|
|||||||
|
|
||||||
|
|
||||||
void MeshViewer::mousePressEvent(QMouseEvent *e) {
|
void MeshViewer::mousePressEvent(QMouseEvent *e) {
|
||||||
if (e->button() == Qt::LeftButton) {
|
if (e->button() == Qt::MiddleButton) {
|
||||||
mouse_pos = e->pos();
|
mouse_pos = e->pos();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,7 +116,7 @@ void MeshViewer::mouseReleaseEvent(QMouseEvent *e) {
|
|||||||
|
|
||||||
|
|
||||||
void MeshViewer::mouseMoveEvent(QMouseEvent *e) {
|
void MeshViewer::mouseMoveEvent(QMouseEvent *e) {
|
||||||
if (e->buttons() & Qt::LeftButton) {
|
if (e->buttons() & Qt::MiddleButton) {
|
||||||
QPoint delta = e->pos() - mouse_pos;
|
QPoint delta = e->pos() - mouse_pos;
|
||||||
rot = rot_start;
|
rot = rot_start;
|
||||||
rot.rotate(delta.x() / 5., 0, 1, 0);
|
rot.rotate(delta.x() / 5., 0, 1, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user