Skip to content

Commit 4be6351

Browse files
committed
vtkLegendScaleActor: add Modified() call after updating points
After updating the points of the vtkPoints instance used for the legend, it's necessary to call Modified(). Otherwise, the legend doesn't update its size or position when the window is resized. The LegendScaleActor example exhibits this behavior: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LegendScaleActor
1 parent ae10fe5 commit 4be6351

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Rendering/Annotation/vtkLegendScaleActor.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ void vtkLegendScaleActor::BuildRepresentation(vtkViewport *viewport)
399399
this->LegendPoints->SetPoint(7, x1+2*delX,20,0);
400400
this->LegendPoints->SetPoint(8, x1+3*delX,20,0);
401401
this->LegendPoints->SetPoint(9, x1+4*delX,20,0);
402+
this->LegendPoints->Modified();
402403

403404
// Specify the position of the legend title
404405
this->LabelActors[5]->SetPosition(0.5*size[0],22);

0 commit comments

Comments
 (0)