mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0030988: Add possibility to attach multiple files to notes
- Swap child/father in RemoveFromGroup method of NotesTool.
(cherry picked from commit 7c0ec2e214
)
This commit is contained in:
@@ -601,16 +601,16 @@ XCAFDoc_NotesTool::RemoveFromGroup(const TDF_Label& theGroupLabel,
|
|||||||
if (!IsGroup(theGroupLabel))
|
if (!IsGroup(theGroupLabel))
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
|
||||||
Handle(XCAFDoc_GraphNode) aFather;
|
Handle(XCAFDoc_GraphNode) aChild;
|
||||||
if (theGroupLabel.FindAttribute(XCAFDoc::NoteRefGUID(), aFather) && !aFather.IsNull())
|
if (theNoteLabel.FindAttribute(XCAFDoc::NoteRefGUID(), aChild) && !aChild.IsNull())
|
||||||
{
|
{
|
||||||
Standard_Integer nbChildren = aFather->NbChildren();
|
Standard_Integer nbFathers = aChild->NbFathers();
|
||||||
for (Standard_Integer iChild = 1; iChild <= nbChildren; ++iChild)
|
for (Standard_Integer iFather = 1; iFather <= nbFathers; ++iFather)
|
||||||
{
|
{
|
||||||
Handle(XCAFDoc_GraphNode) aChild = aFather->GetChild(iChild);
|
Handle(XCAFDoc_GraphNode) aFather = aChild->GetFather(iFather);
|
||||||
if (!aChild.IsNull() && theNoteLabel.IsEqual(aChild->Label()))
|
if (!aFather.IsNull() && theGroupLabel.IsEqual(aFather->Label()))
|
||||||
{
|
{
|
||||||
aFather->UnSetChild(aChild);
|
aChild->UnSetFather(aFather);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user