summaryrefslogtreecommitdiff
path: root/mainwin.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-10-12 11:31:54 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-10-12 11:31:54 (GMT)
commit962977d4b6425e3165f2a65e0e18014c88f1389d (patch)
treef440097e532fb2a0a0707d41782668c853dbcfa9 /mainwin.cc
parent754a3dc15287bf90deb10f75afd099e2a47fe5ef (diff)
Clifford Wolf:
Added orthogonal display mode git-svn-id: http://svn.clifford.at/openscad/trunk@96 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r--mainwin.cc24
1 files changed, 22 insertions, 2 deletions
diff --git a/mainwin.cc b/mainwin.cc
index 564a5a1..4a79de4 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -172,9 +172,12 @@ MainWindow::MainWindow(const char *filename)
menu->addAction("Front", this, SLOT(viewAngleFront()));
menu->addAction("Back", this, SLOT(viewAngleBack()));
menu->addAction("Diagonal", this, SLOT(viewAngleDiagonal()));
+
menu->addSeparator();
- menu->addAction("Perspective");
- menu->addAction("Orthogonal");
+ actViewPerspective = menu->addAction("Perspective", this, SLOT(viewPerspective()));
+ actViewPerspective->setCheckable(true);
+ actViewOrthogonal = menu->addAction("Orthogonal", this, SLOT(viewOrthogonal()));
+ actViewOrthogonal->setCheckable(true);
}
console->setReadOnly(true);
@@ -205,6 +208,7 @@ MainWindow::MainWindow(const char *filename)
#else
viewModeThrownTogether();
#endif
+ viewPerspective();
setCentralWidget(s1);
current_win = NULL;
@@ -1173,3 +1177,19 @@ void MainWindow::viewAngleDiagonal()
screen->updateGL();
}
+void MainWindow::viewPerspective()
+{
+ actViewPerspective->setChecked(true);
+ actViewOrthogonal->setChecked(false);
+ screen->orthomode = false;
+ screen->updateGL();
+}
+
+void MainWindow::viewOrthogonal()
+{
+ actViewPerspective->setChecked(false);
+ actViewOrthogonal->setChecked(true);
+ screen->orthomode = true;
+ screen->updateGL();
+}
+
contact: Jan Huwald // Impressum