From: eap Date: Thu, 17 Nov 2011 08:36:58 +0000 (+0000) Subject: IPAL22823: exception when display operation is applied for edited but not computed... X-Git-Tag: V6_4_0rc1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb763eea3828e292cf893b087b5ceb8f340ed78e;p=modules%2Fsmesh.git 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 --- 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; }