summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorTorsten Paul <Torsten.Paul@gmx.de>2013-10-31 21:54:05 (GMT)
committerTorsten Paul <Torsten.Paul@gmx.de>2013-10-31 21:56:31 (GMT)
commitbe4c72d9e9e03a2f70eb55d8aa70ca43d084045f (patch)
tree69be070a0e2893150a82872966e8eb6a4f7543b1 /src/mainwin.cc
parent170d4a54970f34d4790b0b3ae3a3d4f2f7502660 (diff)
Add menu entry "Reset View" to reset viewport to initial settings (fixes Issue #434).
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 65c511f..5b986b1 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -334,6 +334,7 @@ MainWindow::MainWindow(const QString &filename)
connect(this->viewActionBack, SIGNAL(triggered()), this, SLOT(viewAngleBack()));
connect(this->viewActionDiagonal, SIGNAL(triggered()), this, SLOT(viewAngleDiagonal()));
connect(this->viewActionCenter, SIGNAL(triggered()), this, SLOT(viewCenter()));
+ connect(this->viewActionResetView, SIGNAL(triggered()), this, SLOT(viewResetView()));
connect(this->viewActionPerspective, SIGNAL(triggered()), this, SLOT(viewPerspective()));
connect(this->viewActionOrthogonal, SIGNAL(triggered()), this, SLOT(viewOrthogonal()));
connect(this->viewActionHide, SIGNAL(triggered()), this, SLOT(hideConsole()));
@@ -1772,6 +1773,12 @@ void MainWindow::viewOrthogonal()
this->qglview->updateGL();
}
+void MainWindow::viewResetView()
+{
+ this->qglview->resetView();
+ this->qglview->updateGL();
+}
+
void MainWindow::hideConsole()
{
QSettings settings;
contact: Jan Huwald // Impressum