diff -r 31c6ce8efbc7 -r 6783e13bb05d branchobj.cpp --- a/branchobj.cpp Thu Mar 24 21:10:38 2005 +0000 +++ b/branchobj.cpp Sat Apr 09 22:50:08 2005 +0000 @@ -380,9 +380,11 @@ FloatImageObj *fio; for (fio=floatimage.first(); fio; fio=floatimage.next()) fio->setVisibility (v); + LinkObj* lo; + for (lo=link.first(); lo;lo=link.next() ) + lo->setVisibility (); } } // depth <= toDepth - //FIXME move (absPos.x(), absPos.y() ); requestReposition(); } @@ -798,7 +800,7 @@ } -void BranchObj::removeLink (LinkObj *lo) +void BranchObj::removeLinkRef (LinkObj *lo) { link.remove (lo); } @@ -809,6 +811,16 @@ if (!lo->isUsed()) delete (lo); } +void BranchObj::deleteLinkAt (int i) +{ + LinkObj *lo=link.at(i); + lo->deactivate(); + if (!lo->isUsed()) + { + delete(lo); + } +} + int BranchObj::countLink() { return link.count(); @@ -1044,13 +1056,16 @@ { // Find current parent and // remove pointer to myself there + + if (!dst) return NULL; + BranchObj *par=(BranchObj*)(parObj); if (par) par->removeBranchPtr (this); else return NULL; - if (pos<0) + if (pos<0 || dst->getDepth()==1) { // links adds myself as last branch at dst dst->addBranchPtr (this);