Commit 0364f9b9 authored by Andy Wilson's avatar Andy Wilson
Browse files

Insert numeric values with SetVariantValue instead of ToDouble()

InsertNextRow(vtkVariantArray) was transferring numeric values from the
input to the row data by calling SetTuple1(value.ToDouble()).  This
corrupted the low-order bits of 64-bit integers due to loss of precision.
We avoid this by using the new SetVariantValue method on vtkAbstractArray.
parent 4919ec80
......@@ -403,7 +403,7 @@ void vtkTable::SetValue(vtkIdType row, vtkIdType col, vtkVariant value)
vtkDataArray* data = vtkDataArray::SafeDownCast(arr);
if (comps == 1)
data->SetTuple1(row, value.ToDouble());
data->SetVariantValue(row, value);
Supports Markdown
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