mapcenterobj.cpp
changeset 388 3a58c9ef4a18
parent 377 5391ab620c95
child 395 7ced3733ba60
     1.1 --- a/mapcenterobj.cpp	Thu Sep 14 11:38:17 2006 +0000
     1.2 +++ b/mapcenterobj.cpp	Thu Sep 14 11:38:18 2006 +0000
     1.3 @@ -65,8 +65,8 @@
     1.4  
     1.5  void MapCenterObj::moveAllBy (double dx, double dy)
     1.6  {
     1.7 -	// Move myself
     1.8 -	moveBy(dx,dy);
     1.9 +	// Move myself and childs
    1.10 +	BranchObj::moveBy(dx,dy);
    1.11  }
    1.12  
    1.13  void MapCenterObj::updateLink()
    1.14 @@ -80,6 +80,24 @@
    1.15  		b->updateLink();
    1.16  }
    1.17  
    1.18 +void MapCenterObj::updateRelPositions()
    1.19 +{
    1.20 +	if (repositionRequest) unsetAllRepositionRequests();
    1.21 +
    1.22 +	// update relative Positions of branches and floats
    1.23 +	BranchObj *b;
    1.24 +	for (b=branch.first(); b; b=branch.next() ) 
    1.25 +	{
    1.26 +		b->setRelPos();
    1.27 +		b->setOrientation();
    1.28 +	}
    1.29 +	
    1.30 +	FloatObj *fo;
    1.31 +	for (fo=floatimage.first(); fo; fo=floatimage.next() ) fo->setRelPos();
    1.32 +
    1.33 +	if (repositionRequest) reposition();
    1.34 +}
    1.35 +
    1.36  LinkableMapObj* MapCenterObj::findMapObj(QPoint p, LinkableMapObj *excludeLMO)
    1.37  	{
    1.38  	BranchObj *bo;