From cb763eea3828e292cf893b087b5ceb8f340ed78e Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 17 Nov 2011 08:36:58 +0000 Subject: [PATCH] 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 --- src/OBJECT/SMESH_Object.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index bbecdbc4c..cfaa700cb 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -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; } -- 2.39.2