From 34b94901ab9b56f5485260232788ea698357e60a Mon Sep 17 00:00:00 2001 From: Viktor Uzlov Date: Tue, 9 Mar 2021 21:38:07 +0300 Subject: [PATCH] fix Group Dialog and Highlights --- src/SVTK/SALOME_Actor.cxx | 6 +++--- src/SVTK/SVTK_Actor.cxx | 2 +- src/VTKViewer/VTKViewer_Actor.cxx | 2 +- src/VTKViewer/VTKViewer_Actor.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 70a7c4d3d..48a212d61 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -548,7 +548,7 @@ SALOME_Actor myIsPreselected = (anObjId >= 0); if(myIsPreselected){ const SVTK_TIndexedMapOfVtkId& aMapIndex = myPreHighlightActor->GetMapIndex(); - int anExtent = aMapIndex.Extent(); + vtkIdType anExtent = aMapIndex.Extent(); anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1))); if(anIsChanged){ SVTK_TIndexedMapOfVtkId aMapIndex; @@ -579,7 +579,7 @@ SALOME_Actor myIsPreselected = CheckDimensionId(aSelectionMode,this,anObjId); if(myIsPreselected){ const SVTK_TIndexedMapOfVtkId& aMapIndex = myPreHighlightActor->GetMapIndex(); - int anExtent = aMapIndex.Extent(); + vtkIdType anExtent = aMapIndex.Extent(); anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1))); if(anIsChanged){ SVTK_TIndexedMapOfVtkId aMapIndex; @@ -610,7 +610,7 @@ SALOME_Actor vtkIdType aFNObjId = GetNodeObjId( aFNId ); vtkIdType aSNObjId = GetNodeObjId( aSNId ); const SVTK_IndexedMapOfVtkIds& aMapIds = myPreHighlightActor->GetMapCompositeIndex(); - int anExtent = aMapIds.Extent(); + vtkIdType anExtent = aMapIds.Extent(); anIsChanged |= (anExtent == 0 || (anExtent > 0 && aMapIds(1).size() == 2 && (aFNObjId != aMapIds(1)[0] || aSNObjId != aMapIds(1)[1] ) ) ); if( anIsChanged ) { diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index b09bbcbad..a6c963b21 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -165,7 +165,7 @@ SVTK_Actor vtkPoints *aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(aNbOfParts); for(vtkIdType i = 0; i < aNbOfParts; i++){ - int aPartId = theMapIndex( i+1 ); + vtkIdType aPartId = theMapIndex( i+1 ); if(double* aCoord = theMapActor->GetNodeCoord(aPartId)){ aPoints->SetPoint(i,aCoord); // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 24211a36a..a0f37ded4 100644 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -487,7 +487,7 @@ VTKViewer_Actor */ int VTKViewer_Actor -::GetObjDimension( const int theObjId ) +::GetObjDimension( const vtkIdType theObjId ) { if ( vtkCell* aCell = GetElemCell(theObjId) ) return aCell->GetCellDimension(); diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index 465b9f893..1bc0e2625 100644 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -169,7 +169,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Get dimension of corresponding mesh element virtual int - GetObjDimension( const int theObjId ); + GetObjDimension( const vtkIdType theObjId ); //! To insert some additional filters and then sets the given #vtkMapper virtual -- 2.39.2