mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 12:00:34 +05:00
Remove actors from views
This commit is contained in:
parent
1ed6f15ecf
commit
58311e9176
@ -210,7 +210,7 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
|
||||
|
||||
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);
|
||||
}
|
||||
@ -218,6 +218,12 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
|
||||
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);
|
||||
@ -285,6 +291,7 @@ void SMESHGUI_DeleteGroupDlg::onSelectionDone()
|
||||
return;
|
||||
|
||||
myListGrp.clear();
|
||||
myListGrpIO.Clear();
|
||||
QStringList aNames;
|
||||
|
||||
SALOME_ListIO aListIO;
|
||||
@ -296,6 +303,7 @@ void SMESHGUI_DeleteGroupDlg::onSelectionDone()
|
||||
if (!aGroup->_is_nil()) {
|
||||
aNames.append(aGroup->GetName());
|
||||
myListGrp.append(aGroup);
|
||||
myListGrpIO.Append( anIter.Value() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
||||
// SMESH includes
|
||||
#include "SMESH_SMESHGUI.hxx"
|
||||
|
||||
#include <SALOME_ListIO.hxx>
|
||||
|
||||
// Qt includes
|
||||
#include <QDialog>
|
||||
|
||||
@ -86,6 +88,7 @@ private:
|
||||
SMESHGUI* mySMESHGUI;
|
||||
LightApp_SelectionMgr* mySelectionMgr;
|
||||
|
||||
SALOME_ListIO myListGrpIO;
|
||||
QList<SMESH::SMESH_GroupBase_var> myListGrp;
|
||||
bool myBlockSelection;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user