1.1 --- a/branchobj.cpp Mon Mar 15 15:32:37 2010 +0000
1.2 +++ b/branchobj.cpp Wed Jun 09 13:14:08 2010 +0000
1.3 @@ -29,7 +29,7 @@
1.4
1.5 BranchObj::~BranchObj ()
1.6 {
1.7 -// cout << "Destr BranchObj of "<<this<<" ("<<treeItem->getHeading().toStdString()<<")"<<endl;
1.8 + //qDebug()<< "Destr BranchObj of "<<this<<" ("<<treeItem->getHeading()<<")";
1.9
1.10 // If I'm animated, I need to un-animate myself first
1.11 if (anim.isAnimated() )
1.12 @@ -63,9 +63,6 @@
1.13 void BranchObj::clear()
1.14 {
1.15 //setVisibility (true); //FIXME-4 needed?
1.16 -
1.17 - while (!xlink.isEmpty())
1.18 - delete xlink.takeFirst();
1.19 }
1.20
1.21 void BranchObj::setParObjTmp(LinkableMapObj* dst, QPointF m, int off)
1.22 @@ -251,7 +248,7 @@
1.23 // set the frame
1.24 frame->setRect(QRectF(bbox.x(),bbox.y(),bbox.width(),bbox.height() ) );
1.25
1.26 - //Update links to other branches
1.27 + //Update links to other branches
1.28 XLinkObj *xlo;
1.29 for (int i=0; i<treeItem->xlinkCount(); ++i)
1.30 {
1.31 @@ -738,22 +735,24 @@
1.32 anim=ap;
1.33 }
1.34
1.35 +void BranchObj::stopAnimation()
1.36 +{
1.37 + anim.stop();
1.38 + if (useRelPos)
1.39 + setRelPos (anim);
1.40 + else
1.41 + move (anim);
1.42 +}
1.43 +
1.44 bool BranchObj::animate()
1.45 {
1.46 anim.animate ();
1.47 if ( anim.isAnimated() )
1.48 {
1.49 - //if (((MapItem*)treeItem)->getPositionMode()==MapItem::Relative)
1.50 if (useRelPos)
1.51 - {
1.52 setRelPos (anim);
1.53 - //cout<<"Animating rel "<<treeItem->getHeading().toStdString()<<" "<<anim<<" "<<anim.getStart()<<"->"<<anim.getDest()<<" "<<relPos<<endl;
1.54 - }
1.55 else
1.56 - {
1.57 move (anim);
1.58 - //cout<<"Animating abs "<<treeItem->getHeading().toStdString()<<" "<<anim<<" "<<anim.getStart()<<"->"<<anim.getDest()<<" "<<absPos<<endl;
1.59 - }
1.60 return true;
1.61 }
1.62 /*FIXME-3 reposition in BO:animate nearly never reached? needed?