diff --git a/MainWindow.h b/MainWindow.h index fd5aa7f1..9c4e51a8 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -94,6 +94,7 @@ private slots: void actionExportSTL(); void actionExportOFF(); void actionExportDXF(); + void actionFlushCaches(); public: void viewModeActionsUncheck(); diff --git a/MainWindow.ui b/MainWindow.ui index 3cb8d30a..a85859ad 100644 --- a/MainWindow.ui +++ b/MainWindow.ui @@ -156,6 +156,7 @@ + @@ -604,6 +605,11 @@ Ctrl+W + + + Flush Caches + + diff --git a/mainwin.cc b/mainwin.cc index 742788f3..96577c92 100644 --- a/mainwin.cc +++ b/mainwin.cc @@ -195,6 +195,7 @@ MainWindow::MainWindow(const char *filename) connect(this->designActionExportSTL, SIGNAL(triggered()), this, SLOT(actionExportSTL())); connect(this->designActionExportOFF, SIGNAL(triggered()), this, SLOT(actionExportOFF())); connect(this->designActionExportDXF, SIGNAL(triggered()), this, SLOT(actionExportDXF())); + connect(this->designActionFlushCaches, SIGNAL(triggered()), this, SLOT(actionFlushCaches())); // View menu #ifndef ENABLE_OPENCSG @@ -1130,6 +1131,12 @@ void MainWindow::actionExportDXF() #endif /* ENABLE_CGAL */ } +void MainWindow::actionFlushCaches() +{ + PolySet::ps_cache.clear(); + AbstractNode::cgal_nef_cache.clear(); +} + void MainWindow::viewModeActionsUncheck() { viewActionOpenCSG->setChecked(false); @@ -1683,3 +1690,4 @@ void MainWindow::closeEvent(QCloseEvent *event) event->ignore(); } } +