From: imn Date: Wed, 21 Sep 2016 15:50:14 +0000 (+0300) Subject: 0023337: [CEA 1942] When we modify a mesh hypothesis, the display in the 3D view... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fimn%2F23337;p=modules%2Fsmesh.git 0023337: [CEA 1942] When we modify a mesh hypothesis, the display in the 3D view is not deleted immediatly --- diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index 9a5e014ff..103ffb404 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -29,6 +29,7 @@ #include "SMESHGUI_HypothesesUtils.h" #include "SMESHGUI_Utils.h" #include "SMESHGUI_SpinBox.h" +#include "SMESHGUI_VTKUtils.h" // SALOME KERNEL includes #include @@ -40,9 +41,16 @@ #include #include #include +#include #include #include +#include +#include + +// VTK includes +#include + // Qt includes #include #include @@ -324,6 +332,23 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result ) myDlg->close(); //delete myDlg; since WA_DeleteOnClose==true myDlg = 0; + //imn: to fix the bug 23357. Workaround for fixed problem with repaint in VTK_viewer object. + if (SVTK_ViewWindow* vf = SMESH::GetCurrentVtkView()) { + VTK::ActorCollectionCopy aCopy( vf->getRenderer()->GetActors() ); + vtkActorCollection* anAllActors = aCopy.GetActors(); + if( anAllActors ) { + anAllActors->InitTraversal(); + while( vtkActor* aVTKActor = anAllActors->GetNextActor() ) { + if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) { + if( anActor->GetVisibility() && anActor->GetMapper() ) { + anActor->Highlight( true ); + anActor->Highlight( false ); + } + } + } + } + vf->Repaint( false ); + } emit finished( result ); }