From abf6641b14fa551a3770511bc230c265e901c634 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 12 Nov 2019 19:04:18 +0300 Subject: [PATCH] #18097 [CEA] Mesh group not updated in the view after a compute with other hypotheses --- src/SMESH/SMESH_MeshEditor.cxx | 8 ++++---- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 0673fc64e..b7c6ef24a 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -12567,8 +12567,8 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, for ( inode = 0; inode < srcNodes.size(); ++inode ) tgtNodes[inode] = getNodeWithSameID( tgtMeshDS, srcNodes[inode] ); if ( /*aroundElements && */tgtEditor.GetMeshDS()->FindElement( tgtNodes, - missType, - /*noMedium=*/false)) + missType, + /*noMedium=*/false)) continue; tgtEditor.AddElement( tgtNodes, elemKind.SetPoly( tgtNodes.size()/(iQuad+1) > 4 )); ++nbAddedBnd; @@ -12578,8 +12578,8 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, { TConnectivity& nodes = missingBndElems[ i ]; if ( /*aroundElements && */tgtEditor.GetMeshDS()->FindElement( nodes, - missType, - /*noMedium=*/false)) + missType, + /*noMedium=*/false)) continue; SMDS_MeshElement* newElem = tgtEditor.AddElement( nodes, elemKind.SetPoly( nodes.size()/(iQuad+1) > 4 )); diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 11ab3e150..10e4b196f 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -983,11 +983,9 @@ 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( entry.c_str(), /*clearLog =*/true ); if ( anActor ) // actor is not created for an empty mesh @@ -996,8 +994,7 @@ void SMESHGUI_BaseComputeOp::computeMesh() //SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor ); -- 23615 } } - if ( toDisplay ) - SMESH::UpdateView( SMESH::eDisplay, entry.c_str() ); + SMESH::UpdateView( SMESH::eDisplay, entry.c_str() ); if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() )) if ( vtkWnd->getRenderer() )