# HG changeset patch
# User insilmaril
# Date 1149078458 0
# Node ID 94cd6a4515932f9a72ecbb4015af43de02beb7cc
# Parent  89e7476b0007e5dc22bae9cd2cc6cd1d0032aa4b
1.7.18

diff -r 89e7476b0007 -r 94cd6a451593 branchobj.cpp
--- a/branchobj.cpp	Wed May 31 12:27:38 2006 +0000
+++ b/branchobj.cpp	Wed May 31 12:27:38 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: