diff -r 00ac7b2ac016 -r e886fd2fb37d branchobj.cpp --- a/branchobj.cpp Mon May 08 13:25:46 2006 +0000 +++ b/branchobj.cpp Wed May 31 12:27:41 2006 +0000 @@ -529,6 +529,13 @@ itLast=it; } +void BranchObj::positionContents() +{ + FloatImageObj *fio; + for (fio=floatimage.first(); fio; fio=floatimage.next() ) + fio->reposition(); + OrnamentedObj::positionContents(); +} void BranchObj::move (double x, double y) { @@ -547,10 +554,10 @@ void BranchObj::moveBy (double x, double y) { OrnamentedObj::moveBy (x,y); - positionBBox(); BranchObj* b; for (b=branch.first(); b;b=branch.next() ) b->moveBy (x,y); + positionBBox(); } void BranchObj::moveBy (QPoint p) @@ -1228,16 +1235,13 @@ // If I am the mapcenter or a mainbranch, reposition heading if (depth<2) - { //FIXME optimize this move for MCO needed to initially position text in box... + { //FIXME ugly! optimize this move for MCO needed to initially position text in box... if (depth==1) - { - move (absPos.x(),absPos.y()); // Calc angle to mapCenter if I am a mainbranch // needed for reordering the mainbranches clockwise // around mapcenter angle=getAngle (QPoint ((int)(x() - parObj->getChildPos().x() ), (int)(y() - parObj->getChildPos().y() ) ) ); - } } else { @@ -1298,15 +1302,13 @@ // changes its height, // all upper LMOs have to change, too. calcBBoxSizeWithChilds(); + updateLink(); // This update is needed if the canvas is resized + // due to excessive moving of a FIO + alignRelativeTo ( QPoint (absPos.x(), absPos.y()-(bboxTotal.height()-bbox.height())/2) ); branch.sort(); - updateLink(); // This update is needed if the canvas is resized - // due to excessive moving of a FIO - - // After load, the floats might be at wrong position, force - // them to move, too - //move (absPos); // FIXME really still needed to position floats? + positionBBox(); // Reposition bbox and contents } else { // This is only important for moving branches: