Commit a9d7aebf authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

BUG: Fixed Bounds computation and static flag check.

parent 44d56820
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "vtkDefaultPainter.h" #include "vtkDefaultPainter.h"
vtkStandardNewMacro(vtkCompositePolyDataMapper2); vtkStandardNewMacro(vtkCompositePolyDataMapper2);
vtkCxxRevisionMacro(vtkCompositePolyDataMapper2, "1.4"); vtkCxxRevisionMacro(vtkCompositePolyDataMapper2, "1.5");
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
vtkCompositePolyDataMapper2::vtkCompositePolyDataMapper2() vtkCompositePolyDataMapper2::vtkCompositePolyDataMapper2()
{ {
...@@ -221,15 +221,18 @@ double *vtkCompositePolyDataMapper2::GetBounds() ...@@ -221,15 +221,18 @@ double *vtkCompositePolyDataMapper2::GetBounds()
else else
{ {
if (!this->Static)
{
this->Update(); this->Update();
}
//only compute bounds when the input data has changed //only compute bounds when the input data has changed
vtkCompositeDataPipeline * executive = vtkCompositeDataPipeline::SafeDownCast(this->GetExecutive()); vtkCompositeDataPipeline * executive =
if( executive->GetPipelineMTime() > this->BoundsMTime.GetMTime() ) vtkCompositeDataPipeline::SafeDownCast(this->GetExecutive());
if( executive->GetPipelineMTime() >= this->BoundsMTime.GetMTime() )
{ {
this->ComputeBounds(); this->ComputeBounds();
} }
return this->Bounds; return this->Bounds;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment