]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
IPAL22823: exception when display operation is applied for edited but not computed...
authoreap <eap@opencascade.com>
Thu, 17 Nov 2011 08:36:58 +0000 (08:36 +0000)
committereap <eap@opencascade.com>
Thu, 17 Nov 2011 08:36:58 +0000 (08:36 +0000)
    In SMESH_VisualObjDef::GetUnstructuredGrid(), compact myGrid if
    it is a shallowCopy of SMDS_UnstructuredGrid

src/OBJECT/SMESH_Object.cxx

index bbecdbc4c4cdeb7142bc3f72d7ad34f0473ba6b0..cfaa700cbaf98718cde07ae36f05dce4cc4fdad2 100644 (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;
 }