Skip to content
Snippets Groups Projects
Commit 01435675 authored by Florian Maurin's avatar Florian Maurin
Browse files

Only run content of SetCellId if CurrentMesh has been modified

parent c6b74a91
No related branches found
No related tags found
No related merge requests found
......@@ -63,18 +63,27 @@ void vtkDataSetEdgeSubdivisionCriterion::SetMesh(vtkDataSet* mesh)
this->Modified();
if (this->CurrentMesh)
{
this->CurrentMesh->Register(this);
this->CurrentMesh->Modified();
}
}
void vtkDataSetEdgeSubdivisionCriterion::SetCellId(vtkIdType cell)
{
if ((cell == this->CurrentCellId) && (!this->CurrentMesh->GetMTime() >= this->GetMTime()))
return;
if ((cell == this->CurrentCellId) && this->CurrentCellData)
{
if (this->CurrentCellData->GetMTime() >= this->CurrentMesh->GetMTime())
return;
}
this->CurrentCellId = cell;
if (this->CurrentMesh)
{
this->CurrentCellData = this->CurrentMesh->GetCell(this->CurrentCellId);
this->CurrentCellData->Modified();
}
this->Modified();
}
......
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