Commit 22e0a23f authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

BUG #14202. Modify arrays when changed.

vtkMFIXReader was not modifying reused arrays when the contents were changed.
That was causing ParaView to report incorrect array bounds. Fixed that.

Change-Id: I625e5c3d21735dc84bf5798da82915bd9d0c6d08
parent 004cad2e
......@@ -935,6 +935,7 @@ void vtkMFIXReader::GetBlockOfFloats(istream& in, vtkFloatArray *v, int n)
numberOfRecords = 1 + n/numberOfFloatsInBlock;
}
bool modified = false;
int c = 0;
int cnt = 0;
for (int i=0; i<numberOfRecords; ++i)
......@@ -950,11 +951,17 @@ void vtkMFIXReader::GetBlockOfFloats(istream& in, vtkFloatArray *v, int n)
{
v->InsertValue(cnt, temp);
cnt++;
modified = true;
}
++c;
}
}
}
if (modified)
{
v->Modified();
}
}
//----------------------------------------------------------------------------
......@@ -2261,6 +2268,7 @@ void vtkMFIXReader::FillVectorVariable( int xindex, int yindex,
v->InsertComponent(i, 1, this->CellDataArray[yindex]->GetValue(i));
v->InsertComponent(i, 2, this->CellDataArray[zindex]->GetValue(i));
}
v->Modified();
}
//----------------------------------------------------------------------------
......
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