diff -r 0b048b6bb6f4 -r 58adc2d2ed08 branchobj.cpp --- a/branchobj.cpp Thu Apr 21 19:14:38 2005 +0000 +++ b/branchobj.cpp Wed May 04 20:35:39 2005 +0000 @@ -985,6 +985,25 @@ return bo; } +void BranchObj::removeBranchHere(BranchObj* borem) +{ + // This removes the branch bo from list, but + // inserts its childs at the place of bo + BranchObj *bo; + bo=borem->getLastBranch(); + while (bo) + { + bo->moveBranchTo (borem,1); + bo=borem->getLastBranch(); + } + removeBranch (borem); +} + +void BranchObj::removeChilds() +{ + clear(); +} + void BranchObj::removeBranch(BranchObj* bo) { // if bo is not in branch remove returns false, we @@ -1077,9 +1096,9 @@ else return NULL; - if (pos<0 || dst->getDepth()==1) + if (pos<0||dst->getDepth()==0) { - // links adds myself as last branch at dst + // links myself as last branch at dst dst->addBranchPtr (this); return this; } else