Salome HOME
Fix exception at Break Link after shaper group modification
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index 14e05427db392f2712158ad90e0c4d7ab9ba4a4d..b5720d7970379a272dfa9264dbf978c1fba86ab0 100644 (file)
@@ -951,7 +951,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
           SMESH::SMESH_IDSource_var aSubMeshObj =
             SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( smSObj );
           SMESH_Actor *anActor = SMESH::FindActorByObject( aSubMeshObj );
-          if ( anActor && anActor->GetVisibility() )
+          if ( anActor /*&& anActor->GetVisibility()*/ )
             aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aSubMeshObj, smSObj ));
         }
         // put Groups into list
@@ -967,7 +967,7 @@ void SMESHGUI_BaseComputeOp::computeMesh()
           SMESH::SMESH_IDSource_var aGroupObj =
             SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( aGroupSO );
           SMESH_Actor *anActor = SMESH::FindActorByObject( aGroupObj );
-          if ( anActor && anActor->GetVisibility() )
+          if ( anActor /*&& anActor->GetVisibility()*/ )
             aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aGroupObj, aGroupSO ));
         }
 
@@ -994,6 +994,13 @@ void SMESHGUI_BaseComputeOp::computeMesh()
                   //SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor ); -- 23615
                 }
               }
+              else
+              {
+                SMESH_Actor *anActor = SMESH::FindActorByEntry( entry.c_str() );
+                anActor->Update();
+                if ( !anActor->GetVisibility() )
+                  continue;
+              }
               SMESH::UpdateView( SMESH::eDisplay, entry.c_str() );
 
               if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
@@ -1273,7 +1280,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
         // look for myMainShape in the table
         for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) {
           if ( table()->item( r, COL_SHAPEID )->text() == "1" ) {
-            if ( so->_is_nil() ) {
+            if ( !so->_is_nil() ) {
               CORBA::String_var name  = so->GetName();
               CORBA::String_var entry = so->GetID();
               QString       shapeText = QString("%1 (%2)").arg( name.in() ).arg( entry.in() );