Skip to content
Snippets Groups Projects
Commit 4cd8bdb1 authored by Nicolas Vuaille's avatar Nicolas Vuaille Committed by Mathieu Westphal (Kitware)
Browse files

MeshCache check class name

Specially for Composite sublcasses: if class change,
but not the content (same leaves etc), cache status
reflect that and be disabled

(cherry picked from commit 06ee0008)
parent b72fbaa6
No related branches found
No related tags found
No related merge requests found
......@@ -403,8 +403,21 @@ vtkDataObjectMeshCache::Status vtkDataObjectMeshCache::GetStatus() const
vtkDebugMacro("Consumer modification time has changed.");
}
status.OriginalMeshUnmodified = this->GetNumberOfDataSets(this->Cache) ==
// Be sure that original data and cache are of same class.
if (this->OriginalCompositeDataSet)
{
status.OriginalMeshUnmodified =
strcmp(this->OriginalCompositeDataSet->GetClassName(), this->Cache->GetClassName()) == 0;
}
else if (this->OriginalDataSet)
{
status.OriginalMeshUnmodified =
strcmp(this->OriginalDataSet->GetClassName(), this->Cache->GetClassName()) == 0;
}
status.OriginalMeshUnmodified &= this->GetNumberOfDataSets(this->Cache) ==
this->GetNumberOfDataSets(this->GetOriginalDataObject());
if (!status.OriginalMeshUnmodified)
{
vtkDebugMacro("Input structure has changed.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment