Commit b4046e84 authored by Ken Martin's avatar Ken Martin
Browse files

fixed error in Print method and GetBounds when mapper not set

parent 86e29e05
......@@ -283,7 +283,12 @@ float *vtkActor::GetBounds()
float *result;
vtkMatrix4x4 matrix;
// get the bounds of the Mapper
// get the bounds of the Mapper if we have one
if (!this->Mapper)
{
return this->Bounds;
}
bounds = this->Mapper->GetBounds();
// fill out vertices of a bounding box
......@@ -362,11 +367,18 @@ void vtkActor::PrintSelf(ostream& os, vtkIndent indent)
vtkObject::PrintSelf(os,indent);
// make sure our bounds are up to date
if ( this->Mapper )
{
this->GetBounds();
os << indent << "Bounds: \n";
os << indent << " Xmin,Xmax: (" << this->Bounds[0] << ", " << this->Bounds[1] << ")\n";
os << indent << " Ymin,Ymax: (" << this->Bounds[2] << ", " << this->Bounds[3] << ")\n";
os << indent << " Zmin,Zmax: (" << this->Bounds[4] << ", " << this->Bounds[5] << ")\n";
}
else
{
os << indent << "Bounds: (not defined)\n";
}
os << indent << "Dragable: " << (this->Dragable ? "On\n" : "Off\n");
if ( this->Mapper )
......
Supports Markdown
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