Commit 32215710 authored by Cory Quammen's avatar Cory Quammen

Rebuild representations when the RenderWindow is updated

The size of the handles in the vtkImplicitPlaneRepresentation and
vtkImplicitCylinderRepresentation were not being updated when the
RenderWindow changed size. This could make the handles smaller or
larger than they should be in some cases.  Rebuilding the
representation when the RenderWindow changes ensures the handles are
the correct size in such cases.
parent f6eb0b64
......@@ -1286,7 +1286,7 @@ void vtkImplicitCylinderRepresentation::PushCylinder(double d)
//----------------------------------------------------------------------------
void vtkImplicitCylinderRepresentation::BuildRepresentation()
{
if ( ! this->Renderer )
if ( !this->Renderer || !this->Renderer->GetRenderWindow() )
{
return;
}
......@@ -1302,7 +1302,8 @@ void vtkImplicitCylinderRepresentation::BuildRepresentation()
this->SphereActor->SetPropertyKeys(info);
if ( this->GetMTime() > this->BuildTime ||
this->Cylinder->GetMTime() > this->BuildTime )
this->Cylinder->GetMTime() > this->BuildTime ||
this->Renderer->GetRenderWindow()->GetMTime() > this->BuildTime)
{
double *center = this->Cylinder->GetCenter();
double *axis = this->Cylinder->GetAxis();
......
......@@ -1230,7 +1230,7 @@ void vtkImplicitPlaneRepresentation::PushPlane(double d)
//----------------------------------------------------------------------------
void vtkImplicitPlaneRepresentation::BuildRepresentation()
{
if ( ! this->Renderer )
if ( ! this->Renderer || ! this->Renderer->GetRenderWindow() )
{
return;
}
......@@ -1246,7 +1246,8 @@ void vtkImplicitPlaneRepresentation::BuildRepresentation()
this->SphereActor->SetPropertyKeys(info);
if ( this->GetMTime() > this->BuildTime ||
this->Plane->GetMTime() > this->BuildTime )
this->Plane->GetMTime() > this->BuildTime ||
this->Renderer->GetRenderWindow()->GetMTime() > this->BuildTime )
{
double *origin = this->Plane->GetOrigin();
double *normal = this->Plane->GetNormal();
......
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