summaryrefslogtreecommitdiff
path: root/openscad.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-10-28 20:11:56 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-10-28 20:11:56 (GMT)
commit0cd451bbf9ea2bf69a1ed7e15ba1814a196cb0c5 (patch)
tree8d0539ab12683881fd2c7372d885057fce203885 /openscad.cc
parent7da5706088cecad98dec189328204dfe25d29747 (diff)
Clifford Wolf:
Added MDI support git-svn-id: http://svn.clifford.at/openscad/trunk@124 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'openscad.cc')
-rw-r--r--openscad.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/openscad.cc b/openscad.cc
index 8dd7650..fc9efc8 100644
--- a/openscad.cc
+++ b/openscad.cc
@@ -112,8 +112,10 @@ int main(int argc, char **argv)
if (optind < argc)
filename = argv[optind++];
+#ifndef ENABLE_MDI
if (optind != argc)
help(argv[0]);
+#endif
if (stl_output_file || off_output_file)
{
@@ -203,14 +205,14 @@ int main(int argc, char **argv)
if (filename)
m = new MainWindow(filename);
else
- m = new MainWindow();
-
- m->show();
- m->resize(800, 600);
- m->s1->setSizes(QList<int>() << 400 << 400);
- m->s2->setSizes(QList<int>() << 400 << 200);
-
+ m = new MainWindow;
+#ifdef ENABLE_MDI
+ while (optind < argc)
+ new MainWindow(argv[optind++]);
+ app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
+#else
app.connect(m, SIGNAL(destroyed()), &app, SLOT(quit()));
+#endif
rc = app.exec();
}
else
contact: Jan Huwald // Impressum