mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 21:40:33 +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;
|
QList<SMESH::SMESH_GroupBase_var>::iterator anIter;
|
||||||
for (anIter = myListGrp.begin(); anIter != myListGrp.end(); ++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())
|
if (!aMesh->_is_nil())
|
||||||
aMesh->RemoveGroupWithContents(*anIter);
|
aMesh->RemoveGroupWithContents(*anIter);
|
||||||
}
|
}
|
||||||
@ -218,6 +218,12 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
|
|||||||
myListBox->clear();
|
myListBox->clear();
|
||||||
myListGrp.clear();
|
myListGrp.clear();
|
||||||
mySelectionMgr->clearSelected();
|
mySelectionMgr->clearSelected();
|
||||||
|
|
||||||
|
/** Erase graphical objects **/
|
||||||
|
SALOME_ListIteratorOfListIO anIterIO (myListGrpIO);
|
||||||
|
for ( ; anIterIO.More(); anIterIO.Next())
|
||||||
|
SMESH::RemoveVisualObjectWithActors( anIterIO.Value()->getEntry(), /*fromAllViews=*/true );
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
SMESHGUI::Modified();
|
SMESHGUI::Modified();
|
||||||
mySMESHGUI->updateObjBrowser(true);
|
mySMESHGUI->updateObjBrowser(true);
|
||||||
@ -285,6 +291,7 @@ void SMESHGUI_DeleteGroupDlg::onSelectionDone()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
myListGrp.clear();
|
myListGrp.clear();
|
||||||
|
myListGrpIO.Clear();
|
||||||
QStringList aNames;
|
QStringList aNames;
|
||||||
|
|
||||||
SALOME_ListIO aListIO;
|
SALOME_ListIO aListIO;
|
||||||
@ -296,6 +303,7 @@ void SMESHGUI_DeleteGroupDlg::onSelectionDone()
|
|||||||
if (!aGroup->_is_nil()) {
|
if (!aGroup->_is_nil()) {
|
||||||
aNames.append(aGroup->GetName());
|
aNames.append(aGroup->GetName());
|
||||||
myListGrp.append(aGroup);
|
myListGrp.append(aGroup);
|
||||||
|
myListGrpIO.Append( anIter.Value() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
// SMESH includes
|
// SMESH includes
|
||||||
#include "SMESH_SMESHGUI.hxx"
|
#include "SMESH_SMESHGUI.hxx"
|
||||||
|
|
||||||
|
#include <SALOME_ListIO.hxx>
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
@ -86,6 +88,7 @@ private:
|
|||||||
SMESHGUI* mySMESHGUI;
|
SMESHGUI* mySMESHGUI;
|
||||||
LightApp_SelectionMgr* mySelectionMgr;
|
LightApp_SelectionMgr* mySelectionMgr;
|
||||||
|
|
||||||
|
SALOME_ListIO myListGrpIO;
|
||||||
QList<SMESH::SMESH_GroupBase_var> myListGrp;
|
QList<SMESH::SMESH_GroupBase_var> myListGrp;
|
||||||
bool myBlockSelection;
|
bool myBlockSelection;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user