QList<SMESH::SMESH_GroupBase_var>::iterator anIter;
for (anIter = myListGrp.begin(); anIter != myListGrp.end(); ++anIter) {
- SMESH::SMESH_Mesh_ptr aMesh = (*anIter)->GetMesh();
+ SMESH::SMESH_Mesh_var aMesh = (*anIter)->GetMesh();
if (!aMesh->_is_nil())
aMesh->RemoveGroupWithContents(*anIter);
}
myListBox->clear();
myListGrp.clear();
mySelectionMgr->clearSelected();
+
+ /** Erase graphical objects **/
+ SALOME_ListIteratorOfListIO anIterIO (myListGrpIO);
+ for ( ; anIterIO.More(); anIterIO.Next())
+ SMESH::RemoveVisualObjectWithActors( anIterIO.Value()->getEntry(), /*fromAllViews=*/true );
+
SMESH::UpdateView();
SMESHGUI::Modified();
mySMESHGUI->updateObjBrowser(true);
return;
myListGrp.clear();
+ myListGrpIO.Clear();
QStringList aNames;
SALOME_ListIO aListIO;
if (!aGroup->_is_nil()) {
aNames.append(aGroup->GetName());
myListGrp.append(aGroup);
+ myListGrpIO.Append( anIter.Value() );
}
}
// SMESH includes
#include "SMESH_SMESHGUI.hxx"
+#include <SALOME_ListIO.hxx>
+
// Qt includes
#include <QDialog>
SMESHGUI* mySMESHGUI;
LightApp_SelectionMgr* mySelectionMgr;
+ SALOME_ListIO myListGrpIO;
QList<SMESH::SMESH_GroupBase_var> myListGrp;
bool myBlockSelection;