From: rnv Date: Mon, 13 Dec 2010 09:11:35 +0000 (+0000) Subject: Additional fix for the bug IPAL21936 bounding box does not account real size of object. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f1170a89a1a3e181e30b320f5b9a54ec277e492e;p=modules%2Fgui.git Additional fix for the bug IPAL21936 bounding box does not account real size of object. --- diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 2048c611d..2477d9d9a 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -459,7 +459,7 @@ SALOME_Actor ::highlight(bool theIsHighlight) { vtkFloatingPointType aBounds[6]; - vtkDataSet * aDataSet = myPassFilter.back()->GetOutput(); + vtkDataSet * aDataSet = GetHighlightedDataSet(); aDataSet->GetBounds(aBounds); myOutline->SetBounds(aBounds); myOutlineActor->SetVisibility( GetVisibility() && theIsHighlight ); diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 872ddefcd..5ed8bcfa4 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -711,6 +711,13 @@ vtkFloatingPointType VTKViewer_Actor::GetQuadraticArcAngle() const{ return myGeomFilter->GetQuadraticArcAngle(); } +/*! + * Return pointer to the dataset, which used to calculation of the bounding box of the actor. + * By default it is the input dataset. + */ +vtkDataSet* VTKViewer_Actor::GetHighlightedDataSet() { + return GetInput(); +} diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index af13d6c96..58e1d9f68 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -315,6 +315,9 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle); virtual vtkFloatingPointType GetQuadraticArcAngle() const; + //---------------------------------------------------------------------------- + //! Return pointer to the dataset, which used to calculation of the bounding box of the actor + virtual vtkDataSet* GetHighlightedDataSet(); protected: //----------------------------------------------------------------------------