diff -r f0fe7c36ec5c -r 43268373032d branchobj.cpp --- a/branchobj.cpp Fri Apr 09 14:24:04 2010 +0000 +++ b/branchobj.cpp Wed Jun 09 13:14:08 2010 +0000 @@ -29,7 +29,7 @@ BranchObj::~BranchObj () { -// cout << "Destr BranchObj of "<getHeading().toStdString()<<")"<getHeading()<<")"; // If I'm animated, I need to un-animate myself first if (anim.isAnimated() ) @@ -63,9 +63,6 @@ void BranchObj::clear() { //setVisibility (true); //FIXME-4 needed? - - while (!xlink.isEmpty()) - delete xlink.takeFirst(); } void BranchObj::setParObjTmp(LinkableMapObj* dst, QPointF m, int off) @@ -251,7 +248,7 @@ // set the frame frame->setRect(QRectF(bbox.x(),bbox.y(),bbox.width(),bbox.height() ) ); - //Update links to other branches + //Update links to other branches XLinkObj *xlo; for (int i=0; ixlinkCount(); ++i) { @@ -738,22 +735,24 @@ anim=ap; } +void BranchObj::stopAnimation() +{ + anim.stop(); + if (useRelPos) + setRelPos (anim); + else + move (anim); +} + bool BranchObj::animate() { anim.animate (); if ( anim.isAnimated() ) { - //if (((MapItem*)treeItem)->getPositionMode()==MapItem::Relative) if (useRelPos) - { setRelPos (anim); - //cout<<"Animating rel "<getHeading().toStdString()<<" "<"<getHeading().toStdString()<<" "<"<