IPAL22823: exception when display operation is applied for edited but not computed mesh

In SMESH_VisualObjDef::GetUnstructuredGrid(), compact myGrid if
    it is a shallowCopy of SMDS_UnstructuredGrid
This commit is contained in:
eap 2011-11-17 08:36:58 +00:00
parent 5ced91ed62
commit cb763eea38

View File

@ -595,8 +595,13 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId,
vtkUnstructuredGrid* SMESH_VisualObjDef::GetUnstructuredGrid()
{
//MESSAGE("SMESH_VisualObjDef::GetUnstructuredGrid " << myGrid);
return myGrid;
if ( !myLocalGrid && !GetMesh()->isCompacted() )
{
GetMesh()->compactMesh();
vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
myGrid->ShallowCopy(theGrid);
}
return myGrid;
}