Commit acf00d72 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

Reset the plot's selection when select is called

Updated the base vtkPlot's virtual method to reset the selection when
select methods are called, giving the expected base behavior for a plot
with no selection capabilities. Without this it can cause weird bugs
when vtkChartXY accumulates the selection from all plot objects for
example.

Change-Id: I42bef78d4c6ca6a4d84e3b0cac34a8757c7075bd
parent 534d730e
......@@ -164,12 +164,20 @@ vtkStdString vtkPlot::GetNumber(double position, vtkAxis *axis)
//-----------------------------------------------------------------------------
bool vtkPlot::SelectPoints(const vtkVector2f&, const vtkVector2f&)
{
if (this->Selection)
{
this->Selection->SetNumberOfTuples(0);
}
return false;
}
//-----------------------------------------------------------------------------
bool vtkPlot::SelectPointsInPolygon(const vtkContextPolygon &)
{
if (this->Selection)
{
this->Selection->SetNumberOfTuples(0);
}
return false;
}
......
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