if ( mySelector->HasIndex( myIO ) )
mySelector->GetIndex(myIO, myMapIndex);
- myActor = SVTK::Find<VISU_GaussPtsAct>(myInteractor->getRenderer()->GetActors(),
+ VTK::ActorCollectionCopy aCopy(myInteractor->getRenderer()->GetActors());
+ myActor = SVTK::Find<VISU_GaussPtsAct>(aCopy.GetActors(),
SVTK::TIsSameIObject<VISU_GaussPtsAct>( myIO ));
if ( !myActor )
return aResult;
#include "VISU_PlanesWidget.hxx"
#include "VISU_SphereWidget.hxx"
+#include <VTKViewer_Algorithm.h>
+
#include <vtkObjectFactory.h>
#include <vtkProperty.h>
#include <vtkPointPicker.h>
float aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds();
if(aLastRenderTimeInSeconds > aTol){
size_t aNumberOfCells = 0;
- if(vtkActorCollection *anActorCollection = aRenderer->GetActors()){
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ if(vtkActorCollection *anActorCollection = aCopy.GetActors()){
anActorCollection->InitTraversal();
while(vtkActor *anActor = anActorCollection->GetNextActor()){
if(anActor->GetVisibility()){
#include <SUIT_Session.h>
#include <SVTK_RenderWindowInteractor.h>
+#include <VTKViewer_Algorithm.h>
#include <vtkActorCollection.h>
#include <vtkCallbackCommand.h>
int aNumberOfPoints = 0;
vtkActor* anActor;
- vtkActorCollection* anActColl = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActColl = aCopy.GetActors();
for( anActColl->InitTraversal(); ( anActor = anActColl->GetNextActor() ) != NULL; )
{
if( VISU_GaussPtsAct1* aGaussActor = VISU_GaussPtsAct1::SafeDownCast( anActor ) )
if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
bool aResult;
VVTK::TIsOneActorVisibleAction anAction(aResult);
- SVTK::ForEachIf<SALOME_Actor>(aViewWindow->getRenderer()->GetActors(),
+ VTK::ActorCollectionCopy aCopy(aViewWindow->getRenderer()->GetActors());
+ SVTK::ForEachIf<SALOME_Actor>(aCopy.GetActors(),
SVTK::TIsSameIObject<SALOME_Actor>(theIO),
anAction);
return anAction.myResult;