Salome HOME
PAL19802 A "Clear Mesh data" method for SMESH.Mesh objects
authoreap <eap@opencascade.com>
Tue, 27 May 2008 06:17:13 +0000 (06:17 +0000)
committereap <eap@opencascade.com>
Tue, 27 May 2008 06:17:13 +0000 (06:17 +0000)
    hide groups and submeshes

src/SMESHGUI/SMESHGUI.cxx

index 45044586bbf37a92af58be7b2513ffff9321bf3e..d41fd1d59a6a30d8ebadfcc582a6953519954a51 100644 (file)
@@ -2165,6 +2165,14 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         aMesh->Clear();
         _PTR(SObject) aMeshSObj = SMESH::FindSObject(aMesh);
         SMESH::ModifiedMesh( aMeshSObj, false, true);
         aMesh->Clear();
         _PTR(SObject) aMeshSObj = SMESH::FindSObject(aMesh);
         SMESH::ModifiedMesh( aMeshSObj, false, true);
+        // hide groups and submeshes
+        _PTR(ChildIterator) anIter =
+          SMESH::GetActiveStudyDocument()->NewChildIterator( aMeshSObj );
+        for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
+        {
+          _PTR(SObject) so = anIter->Value();
+          SMESH::UpdateView(SMESH::eErase, so->GetID().c_str());
+        }
       }
       catch (const SALOME::SALOME_Exception& S_ex){
        wc.suspend();
       }
       catch (const SALOME::SALOME_Exception& S_ex){
        wc.suspend();