diff -r a4532e5c2ce3 -r 1c8ff1928b97 mapcenterobj.cpp --- a/mapcenterobj.cpp Mon Nov 20 12:12:05 2006 +0000 +++ b/mapcenterobj.cpp Thu Nov 23 13:53:08 2006 +0000 @@ -1,4 +1,4 @@ -#include +#include #include "mapcenterobj.h" #include "floatimageobj.h" @@ -20,7 +20,7 @@ MapCenterObj::~MapCenterObj() { -// cout << "Destr MapCenterObj\n"; + cout << "Destr MapCenterObj\n"; } void MapCenterObj::clear() @@ -74,9 +74,8 @@ childPos.setX( clickBox.topLeft().x() + (int)(clickBox.width())/2 ); childPos.setY( clickBox.topLeft().y() + (int)(clickBox.height())/2 ); parPos=childPos; - BranchObj *b; - for (b=branch.first(); b; b=branch.next() ) - b->updateLink(); + for (int i=0; iupdateLink(); } void MapCenterObj::updateRelPositions() @@ -84,11 +83,10 @@ if (repositionRequest) unsetAllRepositionRequests(); // update relative Positions of branches and floats - BranchObj *b; - for (b=branch.first(); b; b=branch.next() ) + for (int i=0; isetRelPos(); - b->setOrientation(); + branch.at(i)->setRelPos(); + branch.at(i)->setOrientation(); } for (int i=0; ifindMapObj(p, excludeLMO); + lmo = branch.at(i)->findMapObj(p, excludeLMO); if (lmo!= NULL) return lmo; } // is p in MapCenter? @@ -161,18 +158,16 @@ s+=note.saveToDir(); // Save branches - BranchObj *bo; - for (bo=branch.first(); bo; bo=branch.next() ) - s+=bo->saveToDir(tmpdir,prefix, offset); + for (int i=0; isaveToDir(tmpdir,prefix, offset); // Save FloatImages for (int i=0; isaveToDir (tmpdir,prefix); // Save XLinks - XLinkObj *xlo; - for (xlo=xlink.first(); xlo; xlo=xlink.next() ) - s+=xlo->saveToDir(); + for (int i=0;isaveToDir(); decIndent(); s+=endElement ("mapcenter");