Commit 1d8306e3 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell

BUG: GetSize is not the size I wanted...

GetSize was not the size I was expecting (STL/Qt API). Changed to
GetNumberOfTuples and all is much better again.
parent d8084d1a
......@@ -33,7 +33,7 @@
#include "vtkstd/vector"
#include "vtkstd/algorithm"
vtkCxxRevisionMacro(vtkPlotBar, "1.6");
vtkCxxRevisionMacro(vtkPlotBar, "1.7");
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPlotBar);
......@@ -133,7 +133,7 @@ void vtkPlotBar::GetBounds(double bounds[4])
if (this->UseIndexForXSeries && y)
{
bounds[0] = 0;
bounds[1] = y->GetSize();
bounds[1] = y->GetNumberOfTuples();
y->GetRange(&bounds[2]);
}
else if (x && y)
......@@ -315,7 +315,8 @@ bool vtkPlotBar::UpdateTableCache(vtkTable *table)
vtkErrorMacro(<< "No Y column is set (index 1).");
return false;
}
else if (!this->UseIndexForXSeries && x->GetSize() != y->GetSize())
else if (!this->UseIndexForXSeries &&
x->GetNumberOfTuples() != y->GetNumberOfTuples())
{
vtkErrorMacro("The x and y columns must have the same number of elements.");
return false;
......@@ -334,7 +335,7 @@ bool vtkPlotBar::UpdateTableCache(vtkTable *table)
vtkTemplateMacro(
CopyToPoints(this->Points,
static_cast<VTK_TT*>(y->GetVoidPointer(0)),
y->GetSize()));
y->GetNumberOfTuples()));
}
}
else
......@@ -344,7 +345,7 @@ bool vtkPlotBar::UpdateTableCache(vtkTable *table)
vtkTemplateMacro(
CopyToPointsSwitch(this->Points,
static_cast<VTK_TT*>(x->GetVoidPointer(0)),
y, x->GetSize()));
y, x->GetNumberOfTuples()));
}
}
this->Sorted = false;
......
......@@ -36,7 +36,7 @@
#include "vtkstd/vector"
#include "vtkstd/algorithm"
vtkCxxRevisionMacro(vtkPlotLine, "1.21");
vtkCxxRevisionMacro(vtkPlotLine, "1.22");
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPlotLine);
......@@ -386,9 +386,11 @@ bool vtkPlotLine::UpdateTableCache(vtkTable *table)
vtkErrorMacro(<< "No Y column is set (index 1).");
return false;
}
else if (!this->UseIndexForXSeries && x->GetSize() != y->GetSize())
else if (!this->UseIndexForXSeries &&
x->GetNumberOfTuples() != y->GetNumberOfTuples())
{
vtkErrorMacro("The x and y columns must have the same number of elements.");
vtkErrorMacro("The x and y columns must have the same number of elements. "
<< x->GetNumberOfTuples() << ", " << y->GetNumberOfTuples());
return false;
}
......@@ -405,7 +407,7 @@ bool vtkPlotLine::UpdateTableCache(vtkTable *table)
vtkTemplateMacro(
CopyToPoints(this->Points,
static_cast<VTK_TT*>(y->GetVoidPointer(0)),
y->GetSize()));
y->GetNumberOfTuples()));
}
}
else
......@@ -415,7 +417,7 @@ bool vtkPlotLine::UpdateTableCache(vtkTable *table)
vtkTemplateMacro(
CopyToPointsSwitch(this->Points,
static_cast<VTK_TT*>(x->GetVoidPointer(0)),
y, x->GetSize()));
y, x->GetNumberOfTuples()));
}
}
this->CalculateLogSeries();
......
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