summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-11-04 22:32:24 (GMT)
committerMarius Kintel <marius@kintel.net>2013-11-04 22:32:24 (GMT)
commit77829d0a3a33f6d62dd5c64bc884a4f758366b7e (patch)
tree8c49f2ddfc9807e5bada51b228fa6c4729699abe /src/mainwin.cc
parentaa62be338651cd846477b3e636f42c1307a9c4cb (diff)
parentbe4c72d9e9e03a2f70eb55d8aa70ca43d084045f (diff)
Merge pull request #529 from t-paul/issue434
Add menu entry "Reset View" to reset viewport to initial settings
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