summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 4faed34..a2c845d 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -1275,16 +1275,21 @@ void MainWindow::actionRenderCGAL()
int s = t.elapsed() / 1000;
PRINTF("Total rendering time: %d hours, %d minutes, %d seconds", s / (60*60), (s / 60) % 60, s % 60);
- this->cgalRenderer = new CGALRenderer(*this->root_N);
- // Go to CGAL view mode
- if (viewActionCGALGrid->isChecked()) {
- viewModeCGALGrid();
+ if (!this->root_N->empty()) {
+ this->cgalRenderer = new CGALRenderer(*this->root_N);
+ // Go to CGAL view mode
+ if (viewActionCGALGrid->isChecked()) {
+ viewModeCGALGrid();
+ }
+ else {
+ viewModeCGALSurface();
+ }
+
+ PRINT("Rendering finished.");
}
else {
- viewModeCGALSurface();
+ PRINT("WARNING: No top level geometry to render");
}
-
- PRINT("Rendering finished.");
}
#ifdef USE_PROGRESSWIDGET
contact: Jan Huwald // Impressum