diff --git a/src/TDataStd/TDataStd_TreeNode.cxx b/src/TDataStd/TDataStd_TreeNode.cxx index 1b0b66437f..de47e20c29 100644 --- a/src/TDataStd/TDataStd_TreeNode.cxx +++ b/src/TDataStd/TDataStd_TreeNode.cxx @@ -235,12 +235,7 @@ Standard_Boolean TDataStd_TreeNode::Remove () } if(Father()->HasLast()) { - if (Handle(TDataStd_TreeNode)::DownCast(this) == Father()->Last()) { - if(HasPrevious()) { - Father()->SetLast(Previous()); - } - else Father()->SetLast(bid); - } + Father()->SetLast(bid); } SetFather(bid); @@ -698,6 +693,10 @@ Standard_OStream& TDataStd_TreeNode::Dump (Standard_OStream& anOS) const anOS<<" First="; if (!myFirst->Label().IsNull()) myFirst->Label().EntryDump(anOS); } + if (myLast) { + anOS<<" Last="; + if (!myLast->Label().IsNull()) myLast->Label().EntryDump(anOS); + } anOS<