From: snn Date: Fri, 17 Feb 2017 15:48:08 +0000 (+0300) Subject: XCAF: bug fixes in notes tool X-Git-Tag: V_01_2017_06_30~19 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a5ad0b11f55db4442363a2ae59e7de3a5ec6f755;p=occt-copy.git XCAF: bug fixes in notes tool --- diff --git a/src/XCAFDoc/XCAFDoc_NotesTool.cxx b/src/XCAFDoc/XCAFDoc_NotesTool.cxx index a51fd3accd..e70dbfaea0 100644 --- a/src/XCAFDoc/XCAFDoc_NotesTool.cxx +++ b/src/XCAFDoc/XCAFDoc_NotesTool.cxx @@ -210,7 +210,7 @@ XCAFDoc_NotesTool::AddNote(const TDF_Label& theNoteLabel, { TDF_TagSource aTag; anAnnotatedItem = aTag.NewChild(GetAnnotatedItemsLabel()); - if (!anAnnotatedItem.IsNull()) + if (anAnnotatedItem.IsNull()) return anItemRef; } @@ -236,6 +236,7 @@ XCAFDoc_NotesTool::AddNote(const TDF_Label& theNoteLabel, return anItemRef; } + aChild->SetFather(aFather); aFather->SetChild(aChild); return anItemRef;