Salome HOME
[CEA 13302] Policy for c++ files ? using namespaces in c++ header files. boost_ptr...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index 62acf2ef500617f920a08f687090892ae6bc2667..38f59d9a8a07f3e067978c60a593103591b7d824 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -925,10 +925,6 @@ void SMESHGUI_BaseComputeOp::computeMesh()
 
     // NPAL16631: if ( !memoryLack )
     {
-      _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID(myIObject->getEntry());
-      SMESH::ModifiedMesh( sobj,
-                           !computeFailed && aHypErrors.isEmpty(),
-                           myMesh->NbNodes() == 0);
       update( UF_ObjBrowser | UF_Model );
 
       // SHOW MESH
@@ -992,21 +988,20 @@ void SMESHGUI_BaseComputeOp::computeMesh()
             try {
               OCC_CATCH_SIGNALS;
               bool toDisplay = false;
+              std::string entry = (*anIter).second->GetID();
               if ( !aMesh->_is_nil() ) // display only a mesh
               {
                 toDisplay = true;
                 SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
-                if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetID().c_str(),
-                                                              /*clearLog =*/ true );
+                if ( !anActor ) anActor = SMESH::CreateActor( entry.c_str(), /*clearLog =*/true );
                 if ( anActor ) // actor is not created for an empty mesh
                 {
                   anActor->SetEntityMode( entities );
-                  SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor );
+                  //SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor ); -- 23615
                 }
               }
-              Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
-                ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
-              SMESH::Update(anIO, toDisplay);
+              if ( toDisplay )
+                SMESH::UpdateView( SMESH::eDisplay, entry.c_str() );
 
               if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
                 if ( vtkWnd->getRenderer() )
@@ -1343,7 +1338,7 @@ void SMESHGUI_BaseComputeOp::onShowBadMesh()
       prop->SetPointSize( aPointSize * 3 );
       prop->SetColor( 250, 0, 250 );
       myBadMeshDisplayer->GetActor()->SetProperty( prop );
-      myBadMeshDisplayer->SetData( aMeshData._retn() );
+      myBadMeshDisplayer->SetData( aMeshData.in() );
       prop->Delete();
     }
   }
@@ -1983,11 +1978,10 @@ void SMESHGUI_PrecomputeOp::onPreview()
     SMESH::MeshPreviewStruct_var previewData =
       gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId);
 
-    SMESH::MeshPreviewStruct* previewRes = previewData._retn();
-    if ( previewRes && previewRes->nodesXYZ.length() > 0 )
+    if ( & previewData.in() && previewData->nodesXYZ.length() > 0 )
     {
       computeFailed = false;
-      myPreviewDisplayer->SetData( previewRes );
+      myPreviewDisplayer->SetData( previewData );
       // append shape indices with computed mesh entities
       for ( int i = 0, n = aShapesId->length(); i < n; i++ )
         myMapShapeId[ aShapesId[ i ] ] = 0;