# HG changeset patch
# User insilmaril
# Date 1140538703 0
# Node ID b411e48266cdfc6fd3378a5cf47e2392f029ec74
# Parent  3279540b92508a288adef89990c4ec8a0ef1921f
rudimentary mmap import

diff -r 3279540b9250 -r b411e48266cd branchobj.cpp
--- a/branchobj.cpp	Fri Feb 17 09:22:02 2006 +0000
+++ b/branchobj.cpp	Tue Feb 21 16:18:23 2006 +0000
@@ -642,10 +642,17 @@
 					if (rp.y()+foi->height() > h)
 						botPad=max (botPad,rp.y()+foi->height()-h);
 				}		
+				if (includeImagesHor)
+				{
+					if (rp.x() < 0) 
+						leftPad=max (leftPad,-rp.x());
+					if (rp.x()+foi->width() > w)
+						rightPad=max (rightPad,rp.x()+foi->width()-w);
+				}		
 			}	
 		}	
-		
 		h+=topPad+botPad;
+		w+=leftPad+rightPad;
 	}
 
 	// Frame thickness
@@ -878,7 +885,7 @@
 	calcBBoxSize();
 	positionBBox();
 	requestReposition();
-	// FIMXE undo needed
+	//FIXME undo needed
 }
 
 bool BranchObj::getIncludeImagesVer()
@@ -892,7 +899,7 @@
 	calcBBoxSize();
 	positionBBox();
 	requestReposition();
-	// FIMXE undo needed
+	//FIXME undo needed
 }
 
 bool BranchObj::getIncludeImagesHor()
@@ -908,9 +915,9 @@
 	else
 		a=attribut ("incImgV","false");
 	if (includeImagesHor)
-		a+=" "+attribut ("incImgH","true");
+		a+=attribut ("incImgH","true");
 	else
-		a+=" "+attribut ("incImgH","false");
+		a+=attribut ("incImgH","false");
 	return a;	
 }
 
@@ -1249,10 +1256,10 @@
 		switch (orientation) 
 		{
 			case OrientLeftOfCenter:
-				move (ref.x()-bbox.width(), ref.y() + (th-bbox.height())/2 +topPad);
+				move (ref.x() + rightPad - bbox.width(), ref.y() + (th-bbox.height())/2 +topPad);
 			break;
 			case OrientRightOfCenter:	
-				move (ref.x(), ref.y() + (th-bbox.height())/2 + topPad);
+				move (ref.x() + rightPad, ref.y() + (th-bbox.height())/2 + topPad);
 			break;
 			default:
 				cout <<"LMO::alignRelativeTo: oops, no orientation given...\n";
diff -r 3279540b9250 -r b411e48266cd demos/todo.vym
Binary file demos/todo.vym has changed