]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeNode.h
move directory
[creaImageIO.git] / src2 / creaImageIOTreeNode.h
index 5b221de611009e0ef07009df3e944730d1fde3d1..2905c1a8a0e2784d201da383fe54c2697919afd7 100644 (file)
@@ -60,6 +60,7 @@ namespace creaImageIO
       /// Returns the level of the node in the tree
       virtual int GetLevel() const { return mParent->GetLevel()+1; }
 
+        
       /// Returns the parent of the node
       Node* GetParent() const { return mParent; }
 
@@ -117,7 +118,7 @@ namespace creaImageIO
       { if (mData!=0) return dynamic_cast<T>(mData); return 0; }
 
       /// Sets the node data. Deletes existing data if any.
-         void SetData(boost::shared_ptr<NodeData> d) { mData = d; }//{ if (mData) delete mData; mData = d; }
+         void SetData(boost::shared_ptr<NodeData> d) {mData.reset(); mData = d; }//{ if (mData) delete mData; mData = d; }
 
       /// Sorts the children of the node 
       void SortChildren(const LexicographicalComparator&);