]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
NPAL15983 (EDF PAL 413: Bug when displaying empty groups)
authoreap <eap@opencascade.com>
Mon, 21 May 2007 07:33:28 +0000 (07:33 +0000)
committereap <eap@opencascade.com>
Mon, 21 May 2007 07:33:28 +0000 (07:33 +0000)
void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
{ ...
+          if (!TopoDS_Iterator(myShape).More()) return;

src/GEOMGUI/GEOM_Displayer.cxx

index 60fbb31ecbedb0cfbed8b8e8a604f67039e42874..8e52ce44c96b9f8a0fa4fe9ce4ea5c5505f33eb8 100644 (file)
@@ -82,6 +82,7 @@
 #include <gp_Pln.hxx>
 #include <TColStd_MapOfInteger.hxx>
 #include <TColStd_MapIteratorOfMapOfInteger.hxx>
+#include <TopoDS_Iterator.hxx>
 
 // VTK Includes
 #include <vtkActorCollection.h>
@@ -525,8 +526,11 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
         Handle(GEOM_AISShape) AISShape;
         if (myType == GEOM_VECTOR)
           AISShape = new GEOM_AISVector (myShape, "");
-        else
+        else {
+          if (!TopoDS_Iterator(myShape).More())
+            return;// NPAL15983 (Bug when displaying empty groups)
           AISShape = new GEOM_AISShape (myShape, "");
+        }
         // Temporary staff: vertex must be infinite for correct visualization
         AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX );