Commit 5e5fb779 authored by T.J. Corona's avatar T.J. Corona
Browse files

Force a lookup table reset after vtkAbstractArray::Reset()

This fix is in reference to bug report 0015533. The method Reset() in
vtkAbstractArray was modified to flag a change in data, resulting in the
correct behavior for LookupValue() after Reset() was called. Also, the method
DeepCopy() was changed to only copy valid elements (thanks David Lonie!).
parent 676e65ed
......@@ -240,7 +240,10 @@ public:
// Description:
// Reset to an empty state, without freeing any memory.
void Reset()
{this->MaxId = -1;}
{
this->MaxId = -1;
this->DataChanged();
}
// Description:
// Return the size of the data.
......
......@@ -454,7 +454,7 @@ void vtkVariantArray::DeepCopy(vtkAbstractArray *aa)
this->SaveUserArray = 0;
this->Array = new vtkVariant[this->Size];
for (int i = 0; i < this->Size; ++i)
for (int i = 0; i < (this->MaxId+1); ++i)
{
this->Array[i] = va->Array[i];
}
......
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