From 43decba76c783a302f1a8c9ff97a45146aeb5075 Mon Sep 17 00:00:00 2001 From: apl Date: Mon, 3 Apr 2017 12:23:33 +0300 Subject: [PATCH] 0028616: TNaming - DELETE evolution is not considered by TNaming_NewShapeIterator --- src/TNaming/TNaming_NamedShape.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TNaming/TNaming_NamedShape.cxx b/src/TNaming/TNaming_NamedShape.cxx index d09714f0e9..2fa61dbcb3 100644 --- a/src/TNaming/TNaming_NamedShape.cxx +++ b/src/TNaming/TNaming_NamedShape.cxx @@ -992,7 +992,7 @@ static void SelectSameShape (TNaming_Node*& myNode, if (Valid) { if (Old) { - if( pdn->myOld == RS && pdn->myNew != 0L && pdn->myNew != RS) { + if( pdn->myOld == RS && (pdn->myAtt->Evolution() == TNaming_DELETE || pdn->myNew != 0L) && pdn->myNew != RS) { break; } } @@ -1175,9 +1175,9 @@ Handle(TNaming_NamedShape) TNaming_NewShapeIterator::NamedShape() const const TopoDS_Shape& TNaming_NewShapeIterator::Shape() const { - Standard_NoSuchObject_Raise_if(myNode == 0L, - "TNaming_NewShapeIterator::Shape"); - return myNode->myNew->Shape(); + Standard_NoSuchObject_Raise_if(myNode == 0L, "TNaming_NewShapeIterator::Shape"); + static const TopoDS_Shape aNullShape; + return (myNode->myNew != NULL) ? myNode->myNew->Shape() : aNullShape; } //======================================================================= -- 2.39.5