Commit f7f25408 authored by Kyle Lutz's avatar Kyle Lutz Committed by Dave DeMarle
Browse files

Fix bounds calculation for vtkPlotPoints with bad points

This fixes an issue when calculating the bounds of good points
in the vtkPlotPoints class.

Change-Id: I0ce811100057ddbfd52ba3827e2e4aef92a89927
parent 93e94d9a
......@@ -34,6 +34,7 @@
#include <vector>
#include <algorithm>
#include <limits>
// PIMPL for STL vector...
struct vtkIndexedVector2f
......@@ -788,8 +789,8 @@ void vtkPlotPoints::CalculateBounds(double bounds[4])
vtkVector2f* pts = static_cast<vtkVector2f*>(this->Points->GetVoidPointer(0));
// Initialize our min/max
bounds[0] = bounds[1] = pts[start].GetX();
bounds[2] = bounds[3] = pts[start++].GetY();
bounds[0] = bounds[2] = std::numeric_limits<float>::max();
bounds[1] = bounds[3] = std::numeric_limits<float>::min();
while (start < nPoints)
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