From: Anthony Geay Date: Fri, 7 Apr 2023 08:37:15 +0000 (+0200) Subject: Factorisation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10f11063a701b725cd1289dfec14e5f131b484c0;p=modules%2Fsmesh.git Factorisation --- diff --git a/src/SMESHGUI/SMESHGUI_Displayer.cxx b/src/SMESHGUI/SMESHGUI_Displayer.cxx index a20af5bee..6a3d7a252 100644 --- a/src/SMESHGUI/SMESHGUI_Displayer.cxx +++ b/src/SMESHGUI/SMESHGUI_Displayer.cxx @@ -42,15 +42,6 @@ //For PV3D #include "SMESH_Actor.h" -#include "vtkDataSet.h" -#include "vtkMapper.h" -#include "pqServer.h" -#include "pqApplicationCore.h" -#include "pqServerManagerModel.h" -#include "pqObjectBuilder.h" -#include "pqPipelineSource.h" -#include "vtkSMSourceProxy.h" -#include "vtkPVTrivialProducer.h" // IDL includes #include @@ -111,19 +102,7 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_ SPV3D_Prs *pv3dPrs = dynamic_cast( prs ); if( pv3dPrs ) { - anActor->GetMapper()->Update(); - vtkDataObject *ds = anActor->GetMapper()->GetInput(); - vtkDataSet *ds2 = vtkDataSet::SafeDownCast(ds); - pqServer *serv(pqApplicationCore::instance()->getServerManagerModel()->findServer(pqServerResource("builtin:"))); - pqObjectBuilder *builder(pqApplicationCore::instance()->getObjectBuilder()); - pqPipelineSource *mySourceProducer(builder->createSource("sources","PVTrivialProducer",serv)); - vtkSMProxy *producerBase = mySourceProducer->getProxy(); - vtkSMSourceProxy *producer(vtkSMSourceProxy::SafeDownCast(producerBase)); - vtkObjectBase *clientSideObject(producer->GetClientSideObject()); - vtkPVTrivialProducer *clientSideObjectCast = vtkPVTrivialProducer::SafeDownCast(clientSideObject); - clientSideObjectCast->SetOutput(ds2); - mySourceProducer->updatePipeline(); - pv3dPrs->SetSourceProducer( mySourceProducer ); + pv3dPrs->FillUsingActor( anActor ); } } }