diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp index a5aa63d61e1dcd2afc09b536868079cebb450ca8..95bacb3fdbe2341ee3b31b11fc74658723a1e24a 100644 --- a/Gui/mainwindow.cpp +++ b/Gui/mainwindow.cpp @@ -748,6 +748,8 @@ QMenu* MainWindow::createImportFilesMenu() QAction* shapeFiles = importFiles->addAction("&Shape Files..."); connect(shapeFiles, SIGNAL(triggered()), this, SLOT(importShape())); #endif + QAction* tetgenFiles = importFiles->addAction("&TetGen Files..."); + connect( tetgenFiles, SIGNAL(triggered()), this, SLOT(importTetGen()) ); QAction* vtkFiles = importFiles->addAction("&VTK Files..."); connect( vtkFiles, SIGNAL(triggered()), this, SLOT(importVtk()) ); @@ -893,6 +895,21 @@ void MainWindow::importNetcdf() } } +void MainWindow::importTetGen() +{ + QSettings settings("UFZ", "OpenGeoSys-5"); + QString fileName = QFileDialog::getOpenFileName(this, + "Select TetGen file to import", + settings.value( + "lastOpenedFileDirectory").toString(), + "TetGen files (*.nc);;"); + if (!fileName.isEmpty()) + { + loadFile(fileName); + QDir dir = QDir(fileName); + settings.setValue("lastOpenedFileDirectory", dir.absolutePath()); + }} + void MainWindow::importVtk() { QSettings settings("UFZ", "OpenGeoSys-5"); diff --git a/Gui/mainwindow.h b/Gui/mainwindow.h index a8df06c1c0d8414eec85f59b1b42bd2eb45a0bbe..59baa0513839e87ee21d7a9ed47426584c93157e 100644 --- a/Gui/mainwindow.h +++ b/Gui/mainwindow.h @@ -74,6 +74,7 @@ protected slots: void importNetcdf(); //YW 07.2010 void importVtk(); void importFeflow(); + void importTetGen(); void loadFEMConditions(std::string geoName); void openDatabase(); void openDatabaseConnection(); diff --git a/VtkVis/VtkVisPipeline.cpp b/VtkVis/VtkVisPipeline.cpp index d322b79bc42e6bb72f164f461e1fdda6e30ca4e8..ee6fe322fe4acf76c205bb3aabc6a8be41d5552f 100644 --- a/VtkVis/VtkVisPipeline.cpp +++ b/VtkVis/VtkVisPipeline.cpp @@ -531,7 +531,6 @@ void VtkVisPipeline::highlightGeoObject(const vtkPolyDataAlgorithm* source, int parentItem->transformFilter()); static_cast<VtkCompositeGeoObjectFilter*>(filter)->SetIndex(index); VtkVisPointSetItem* item = new VtkVisPointSetItem(filter, parentItem, itemData); - //_highlighted_geo_index = this->createIndex(i, 0, item); QModelIndex parent_index = static_cast<TreeModel*>(this)->index(i, 0, QModelIndex()); _highlighted_geo_index = this->addPipelineItem(item, parent_index); break;