compiles on openSUSE 15.4 part 2
[engrid-github.git] / src / libengrid / deletepickedcell.cpp
blob3875f5ccf46308309ec2bf0095a2579f83692740
1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // + +
3 // + This file is part of enGrid. +
4 // + +
5 // + Copyright 2008-2014 enGits GmbH +
6 // + +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
11 // + +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
16 // + +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
19 // + +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 #include "deletepickedcell.h"
23 #include "guimainwindow.h"
24 #include "deletepickedpoint.h"
25 #include "deletecells.h"
27 #include <vtkCell.h>
28 #include <vtkGenericCell.h>
30 void DeletePickedCell::operate()
32 vtkIdType id_cell = GuiMainWindow::pointer()->getPickedCell();
33 cout<<"You picked "<<id_cell<<endl;
34 if( id_cell<0 || GuiMainWindow::pointer()->getPickedObject()!=2 ) {
35 QApplication::restoreOverrideCursor();
36 EG_ERR_RETURN("Error: No cell picked.");
39 QVector <vtkIdType> targets;
40 targets.push_back(id_cell);
41 DeleteCells terminator;
42 terminator.setCellsToDelete(targets);
43 terminator();
45 /* vtkIdType N_pts, *pts;
46 m_Grid->GetCellPoints(id_cell, N_pts, pts);*/