From: ouv Date: Wed, 20 Mar 2013 12:36:24 +0000 (+0000) Subject: Porting to VTK 6. X-Git-Tag: before_mergefrom_V6_main_01Apr13~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=84a965025a81160caf2dc584f50981271fc0dbe5;p=modules%2Fvisu.git Porting to VTK 6. Fixing bugs with SIGSEGV on creation of presentations. --- diff --git a/src/CONVERTOR/VISU_CommonCellsFilter.cxx b/src/CONVERTOR/VISU_CommonCellsFilter.cxx index 4473acb6..526c5bc1 100644 --- a/src/CONVERTOR/VISU_CommonCellsFilter.cxx +++ b/src/CONVERTOR/VISU_CommonCellsFilter.cxx @@ -209,10 +209,10 @@ namespace vtkStandardNewMacro(VISU_CommonCellsFilter); VISU_CommonCellsFilter -::VISU_CommonCellsFilter() : - myIsProfileSet( false ), - myIsCellsSet( false ) -{} +::VISU_CommonCellsFilter() +{ + this->SetNumberOfInputPorts(1); +} VISU_CommonCellsFilter ::~VISU_CommonCellsFilter() @@ -222,7 +222,6 @@ void VISU_CommonCellsFilter ::SetProfileUG(vtkAlgorithmOutput *input) { - myIsProfileSet = true; this->SetInputConnection(0, input); } @@ -230,7 +229,7 @@ void VISU_CommonCellsFilter ::SetCellsUG(vtkAlgorithmOutput *input) { - myIsCellsSet = true; + this->SetNumberOfInputPorts(2); this->SetInputConnection(1, input); } @@ -243,15 +242,12 @@ VISU_CommonCellsFilter { VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute"); - if( !myIsProfileSet ) - return 0; - vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0); vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast( inInfo1->Get(vtkDataObject::DATA_OBJECT())); vtkUnstructuredGrid *anInputCellsUG = NULL; - if( myIsCellsSet ) + if( this->GetNumberOfInputPorts() > 1 ) { vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0); anInputCellsUG = vtkUnstructuredGrid::SafeDownCast( diff --git a/src/CONVERTOR/VISU_CommonCellsFilter.hxx b/src/CONVERTOR/VISU_CommonCellsFilter.hxx index 7074bfca..51f3ba3d 100644 --- a/src/CONVERTOR/VISU_CommonCellsFilter.hxx +++ b/src/CONVERTOR/VISU_CommonCellsFilter.hxx @@ -48,10 +48,6 @@ protected: virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data -private: - bool myIsProfileSet; - bool myIsCellsSet; - private: VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy void operator=(const VISU_CommonCellsFilter&); // Lock copy