mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0024645: Pointer to the last is wrong for a tree node
- An extra call to DownCast() is removed for a performance reason. - Information on last child is added to the Dump() method + fixed a problem of lost last child tree node on removal (detach) operation. - Test case for issue CR24645
This commit is contained in:
parent
3fe0074677
commit
34859f0536
@ -226,7 +226,7 @@ Standard_Boolean TDataStd_TreeNode::Remove ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Father()->HasFirst()) {
|
if (Father()->HasFirst()) {
|
||||||
if (Handle(TDataStd_TreeNode)::DownCast(this) == Father()->First()) {
|
if (this == Father()->First().operator->()) {
|
||||||
if (HasNext()) {
|
if (HasNext()) {
|
||||||
Father()->SetFirst(Next());
|
Father()->SetFirst(Next());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user