vymmodel.cpp
changeset 835 31841b366d5e
parent 834 0fad394bc330
child 837 5ecd0462f76b
     1.1 --- a/vymmodel.cpp	Wed Mar 10 15:36:19 2010 +0000
     1.2 +++ b/vymmodel.cpp	Mon Mar 15 11:49:42 2010 +0000
     1.3 @@ -2284,6 +2284,7 @@
     1.4  		QString ("addMapCenter (%1,%2)").arg (contextPos.x()).arg(contextPos.y()),
     1.5  		QString ("Adding MapCenter to (%1,%2)").arg (contextPos.x()).arg(contextPos.y())
     1.6  	);	
     1.7 +	mapEditor->autoLayout();	//FIXME-3 testing
     1.8  	return bi;	
     1.9  }
    1.10  
    1.11 @@ -4750,10 +4751,20 @@
    1.12  }
    1.13  
    1.14  
    1.15 +void VymModel::startAnimation(BranchObj *bo, const QPointF &v)
    1.16 +{
    1.17 +	if (!bo) return;
    1.18 +
    1.19 +	if (bo->getUseRelPos())
    1.20 +		startAnimation (bo,bo->getRelPos(),bo->getRelPos()+v);
    1.21 +	else
    1.22 +		startAnimation (bo,bo->getAbsPos(),bo->getAbsPos()+v);
    1.23 +}
    1.24 +
    1.25  void VymModel::startAnimation(BranchObj *bo, const QPointF &start, const QPointF &dest)
    1.26  {
    1.27  	if (start==dest) return;
    1.28 -	if (bo && bo->getTreeItem()->depth()>0) 
    1.29 +	if (bo && bo->getTreeItem()->depth()>=0) 
    1.30  	{
    1.31  		AnimPoint ap;
    1.32  		ap.setStart (start);