Add ability to reset translation to center

This commit is contained in:
Thomas Wilshaw
2020-06-16 11:53:34 +01:00
parent 2174100342
commit f4d56f79cb
+6
View File
@@ -157,6 +157,12 @@ void ViewerDisplayWidget::mousePressEvent(QMouseEvent *event)
return;
}
// reset translation
if (event->button() == Qt::MiddleButton && event->modifiers() & Qt::ControlModifier) {
QMatrix4x4 mat;
SetMatrixTranslate(mat);
}
if (event->button() == Qt::MiddleButton) {
printf("Middle Button Clicked\n");
position_ = event->pos();