mapcenterobj.cpp
changeset 753 25a77484ec72
parent 749 9ff332964015
child 754 db0ec4bcf416
     1.1 --- a/mapcenterobj.cpp	Thu Apr 02 09:57:47 2009 +0000
     1.2 +++ b/mapcenterobj.cpp	Tue Apr 07 16:15:53 2009 +0000
     1.3 @@ -90,8 +90,8 @@
     1.4  	childPos.setX( clickBox.topLeft().x() + (int)(clickBox.width())/2 );
     1.5  	childPos.setY( clickBox.topLeft().y() + (int)(clickBox.height())/2 );
     1.6  	parPos=childPos;		
     1.7 -	for (int i=0; i<branch.size(); ++i)
     1.8 -		branch.at(i)->updateLink();
     1.9 +	for (int i=0; i<treeItem->branchCount(); ++i)
    1.10 +		treeItem->getBranchObjNum(i)->updateLink();
    1.11  }
    1.12  
    1.13  void MapCenterObj::updateRelPositions()
    1.14 @@ -99,10 +99,10 @@
    1.15  	if (repositionRequest) unsetAllRepositionRequests();
    1.16  
    1.17  	// update relative Positions of branches and floats
    1.18 -	for (int i=0; i<branch.size(); ++i)
    1.19 +	for (int i=0; i<treeItem->branchCount(); ++i)
    1.20  	{
    1.21 -		branch.at(i)->setRelPos();
    1.22 -		branch.at(i)->setOrientation();
    1.23 +		treeItem->getBranchObjNum(i)->setRelPos();
    1.24 +		treeItem->getBranchObjNum(i)->setOrientation();
    1.25  	}
    1.26  	
    1.27  	for (int i=0; i<floatimage.size(); ++i)
    1.28 @@ -116,9 +116,9 @@
    1.29  	LinkableMapObj *lmo;
    1.30  
    1.31  	// Search through child branches
    1.32 -	for (int i=0; i<branch.size(); ++i)
    1.33 +	for (int i=0; i<treeItem->branchCount(); ++i)
    1.34  	{	
    1.35 -		lmo = branch.at(i)->findMapObj(p, excludeLMO);
    1.36 +		lmo = treeItem->getBranchObjNum(i)->findMapObj(p, excludeLMO);
    1.37  		if (lmo!= NULL) return lmo;
    1.38  	}
    1.39  	// is p in MapCenter?
    1.40 @@ -169,7 +169,7 @@
    1.41  	s+=standardFlags->saveToDir(tmpdir+"/flags", "/standardFlag-", verbose);
    1.42  
    1.43  	// Save heading
    1.44 -    s+=valueElement("heading", getHeading(),a);
    1.45 +    s+=valueElement("heading", treeItem->getHeading(),a);
    1.46  
    1.47  	// Save frame
    1.48  	s+=frame->saveToDir ();
    1.49 @@ -182,8 +182,8 @@
    1.50  		s+=treeItem->getNoteObj().saveToDir();
    1.51  	
    1.52  	// Save branches
    1.53 -	for (int i=0; i<branch.size(); ++i)
    1.54 -		s+=branch.at(i)->saveToDir(tmpdir,prefix, offset);
    1.55 +	for (int i=0; i<treeItem->branchCount(); ++i)
    1.56 +		s+=treeItem->getBranchObjNum(i)->saveToDir(tmpdir,prefix, offset);
    1.57  
    1.58  	// Save FloatImages
    1.59  	for (int i=0; i<floatimage.size(); ++i)