branchobj.cpp
changeset 835 31841b366d5e
parent 823 0bba81dde1bc
child 836 62d621e3e550
     1.1 --- a/branchobj.cpp	Wed Mar 10 15:36:19 2010 +0000
     1.2 +++ b/branchobj.cpp	Mon Mar 15 11:49:42 2010 +0000
     1.3 @@ -738,15 +738,29 @@
     1.4  	anim=ap;
     1.5  }
     1.6  
     1.7 +//#include <iostream>
     1.8  bool BranchObj::animate()
     1.9  {
    1.10  	anim.animate ();
    1.11  	if ( anim.isAnimated() )
    1.12  	{
    1.13 -		setRelPos (anim);
    1.14 +		//if (((MapItem*)treeItem)->getPositionMode()==MapItem::Relative) 
    1.15 +		if (useRelPos)
    1.16 +		{
    1.17 +			setRelPos (anim);
    1.18 +			//cout<<"Animating rel "<<treeItem->getHeading().toStdString()<<" "<<anim<<" "<<anim.getStart()<<"->"<<anim.getDest()<<"  "<<relPos<<endl;
    1.19 +		}
    1.20 +		else
    1.21 +		{
    1.22 +			move (anim);
    1.23 +			//cout<<"Animating abs "<<treeItem->getHeading().toStdString()<<" "<<anim<<" "<<anim.getStart()<<"->"<<anim.getDest()<<"  "<<absPos<<endl;
    1.24 +		}
    1.25  		return true;
    1.26  	}
    1.27 -	parObj->reposition();	// we might have been relinked meanwhile
    1.28 +	/*FIXME-3 reposition in BO:animate nearly never reached? needed?	
    1.29 +	if (((MapItem*)treeItem)->getPositionMode()==MapItem::Relative)
    1.30 +		parObj->reposition();	// we might have been relinked meanwhile
    1.31 +	*/	
    1.32  	return false;
    1.33  }
    1.34