1.1 --- a/branchobj.cpp Thu Mar 24 21:10:38 2005 +0000
1.2 +++ b/branchobj.cpp Sat Apr 09 22:50:08 2005 +0000
1.3 @@ -380,9 +380,11 @@
1.4 FloatImageObj *fio;
1.5 for (fio=floatimage.first(); fio; fio=floatimage.next())
1.6 fio->setVisibility (v);
1.7 + LinkObj* lo;
1.8 + for (lo=link.first(); lo;lo=link.next() )
1.9 + lo->setVisibility ();
1.10 }
1.11 } // depth <= toDepth
1.12 - //FIXME move (absPos.x(), absPos.y() );
1.13 requestReposition();
1.14 }
1.15
1.16 @@ -798,7 +800,7 @@
1.17
1.18 }
1.19
1.20 -void BranchObj::removeLink (LinkObj *lo)
1.21 +void BranchObj::removeLinkRef (LinkObj *lo)
1.22 {
1.23 link.remove (lo);
1.24 }
1.25 @@ -809,6 +811,16 @@
1.26 if (!lo->isUsed()) delete (lo);
1.27 }
1.28
1.29 +void BranchObj::deleteLinkAt (int i)
1.30 +{
1.31 + LinkObj *lo=link.at(i);
1.32 + lo->deactivate();
1.33 + if (!lo->isUsed())
1.34 + {
1.35 + delete(lo);
1.36 + }
1.37 +}
1.38 +
1.39 int BranchObj::countLink()
1.40 {
1.41 return link.count();
1.42 @@ -1044,13 +1056,16 @@
1.43 {
1.44 // Find current parent and
1.45 // remove pointer to myself there
1.46 +
1.47 + if (!dst) return NULL;
1.48 +
1.49 BranchObj *par=(BranchObj*)(parObj);
1.50 if (par)
1.51 par->removeBranchPtr (this);
1.52 else
1.53 return NULL;
1.54
1.55 - if (pos<0)
1.56 + if (pos<0 || dst->getDepth()==1)
1.57 {
1.58 // links adds myself as last branch at dst
1.59 dst->addBranchPtr (this);