Salome HOME
+ bool findUVByHalfDivision( const gp_Pnt& thePoint, const gp_XY& theUV,
[modules/smesh.git] / src / SMESHUtils / SMESH_Tree.hxx
index 61ee057f0975f7c7f9dbde090cc1551330691b51..cb821ce71a71460dcd126c09be2477e8ab955817 100644 (file)
@@ -115,14 +115,14 @@ protected:
   // Tree limit
   const SMESH_TreeLimit* myLimit;
 
-private:
-  // Build the children recursively
-  void                   buildChildren();
+  // Bounding box of a tree
+  box_type*      myBox;
 
   // Level of the Tree
   int            myLevel;
 
-  box_type*      myBox;
+  // Build the children recursively
+  void                   buildChildren();
 };
 
 //===========================================================================
@@ -219,6 +219,8 @@ void SMESH_Tree<BND_BOX,NB_CHILDREN>::buildChildren()
     myChildren[i] = newChild();
     // and we assign to him its box.
     myChildren[i]->myFather = this;
+    if (myChildren[i]->myLimit)
+      delete myChildren[i]->myLimit;
     myChildren[i]->myLimit = myLimit;
     myChildren[i]->myLevel = myLevel + 1;
     myChildren[i]->myBox = newChildBox( i );