NPAL15983 (EDF PAL 413: Bug when displaying empty groups)

void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
{ ...
+          if (!TopoDS_Iterator(myShape).More()) return;
This commit is contained in:
eap 2007-05-21 07:33:28 +00:00
parent d963823e09
commit 3008c91893

View File

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