]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Additional fix for the bug IPAL21936 bounding box does not account real size of object.
authorrnv <rnv@opencascade.com>
Mon, 13 Dec 2010 09:11:35 +0000 (09:11 +0000)
committerrnv <rnv@opencascade.com>
Mon, 13 Dec 2010 09:11:35 +0000 (09:11 +0000)
src/SVTK/SALOME_Actor.cxx
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h

index 2048c611d86f1d7d92a3d69eb7c2e77114b8df1f..2477d9d9ab572e227ec9f14fd7ab92b8ca6d484c 100644 (file)
@@ -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 );
index 872ddefcd36d7b0d4deef2bda3baceca8b8e5361..5ed8bcfa472c5baa3e4d5b8f287ec450000f3c2b 100755 (executable)
@@ -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();
+}
 
 
 
index af13d6c9609368b3b4d1ed2440d69a686c584db0..58e1d9f68b167830a67e0e30583155ef0e0dbad3 100755 (executable)
@@ -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:
   //----------------------------------------------------------------------------