# HG changeset patch
# User insilmaril
# Date 1149078459 0
# Node ID 5b6f2a3969799d9aec1e1f39bce29c149e771758
# Parent  1fae1d33285d0d0cc90ac488119f87be1e3f5bd4
1.7.18

diff -r 1fae1d33285d -r 5b6f2a396979 demos/todo.vym
Binary file demos/todo.vym has changed
diff -r 1fae1d33285d -r 5b6f2a396979 mapeditor.cpp
--- a/mapeditor.cpp	Wed May 31 12:27:38 2006 +0000
+++ b/mapeditor.cpp	Wed May 31 12:27:39 2006 +0000
@@ -321,6 +321,7 @@
 		{
 			mapCenter->moveAllBy(dx,dy);
 			mapCenter->reposition();
+//			mapCenter->positionBBox();	// To move float
 
 			// scroll the view (in order to not move map on screen)
 			scrollBy (dx,dy);
@@ -2316,7 +2317,7 @@
 	{		
 		BranchObj *bo=(BranchObj*)selection;
 		QString url= "https://bugzilla.novell.com/show_bug.cgi?id="+bo->getHeading();
-		saveState("setURL (\""+bo->getURL()+"\")","setURL (\""+url+"\")",QString("Use heading of %1 as link to Bugzilla").arg(getName(bo)));	
+		saveState("setURL (\""+bo->getURL()+"\")","setURL (\""+url+"\")",QString("Use heading of %1 as link to Novell Bugzilla").arg(getName(bo)));	
 		bo->setURL (url);
 		updateActions();
 	}
@@ -2438,7 +2439,7 @@
 {
 	if (selection && (typeid(*selection) == typeid(BranchObj) ))
 	{		
-		saveState(selection->getParObj(), QString("Remove childs of branch").arg(getName(selection)));
+		saveState(selection->getParObj(), QString("Remove childs of branch %1").arg(getName(selection)));
 		((BranchObj*)selection)->removeChilds();
 		mapCenter->reposition();
 	}	
@@ -3073,6 +3074,9 @@
 {
 	cout << "MapEditor::testFunction() called\n";
 
+	mapCenter->positionBBox();
+	return;
+
 	WarningDialog dia;
 	dia.setCancelButton (true);
 	dia.setText("This is a longer \nWarning");
@@ -3425,14 +3429,6 @@
 				} else	
 				{
 					lmosel->unsetParObjTmp();
-					/* FIXME not needed anymore?
-					if (lmo &&(lmo==selection))   
-						// Could link to myself (happens sometimes...)
-						lmosel->unsetParObjTmp();
-					if (!lmo)  
-						// no Obj under selection, go back to original Parent
-						lmosel->unsetParObjTmp();
-					*/	
 				}		
 			} // depth>0
 
@@ -3524,8 +3520,7 @@
 		dst=mapCenter->findMapObj(inverseWorldMatrix().map(e->pos() ), 
 			((LinkableMapObj*)selection) );
 
-		if (dst &&
-		(typeid(*dst)!=typeid(BranchObj)&&typeid(*dst)!=typeid(MapCenterObj))) 
+		if (dst && (typeid(*dst)!=typeid(BranchObj) && typeid(*dst)!=typeid(MapCenterObj))) 
 			dst=NULL;
 		
 		// Now check, if we have been moving a branch 
diff -r 1fae1d33285d -r 5b6f2a396979 mapobj.cpp
--- a/mapobj.cpp	Wed May 31 12:27:38 2006 +0000
+++ b/mapobj.cpp	Wed May 31 12:27:39 2006 +0000
@@ -94,7 +94,7 @@
 {
 	int ix=(int)x;
 	int iy=(int)y;
-    move (x+absPos.x(),y+absPos.y() );
+    MapObj::move (x+absPos.x(),y+absPos.y() );
 	bbox.moveBy (ix,iy);
 	clickBox.moveBy (ix,iy);
 }
diff -r 1fae1d33285d -r 5b6f2a396979 ornamentedobj.cpp
--- a/ornamentedobj.cpp	Wed May 31 12:27:38 2006 +0000
+++ b/ornamentedobj.cpp	Wed May 31 12:27:39 2006 +0000
@@ -125,7 +125,6 @@
 
 	ornamentsBBox.moveTopLeft ( QPoint ((int)(ox+x),(int)(oy+y)));
 	clickBox.moveTopLeft (QPoint ((int)(ox + x), (int)(oy + y)));
-
 }
 
 void OrnamentedObj::move (double x, double y)
diff -r 1fae1d33285d -r 5b6f2a396979 xml.cpp
--- a/xml.cpp	Wed May 31 12:27:38 2006 +0000
+++ b/xml.cpp	Wed May 31 12:27:39 2006 +0000
@@ -585,7 +585,11 @@
 			y=a.value("relPosY").toInt (&oky, 10);
 			if (okx && oky) 
 				
-				lastFloat->setRelPos (QPoint (x,y) );
+				{
+					lastFloat->setRelPos (QPoint (x,y) );
+					// make sure floats in mapcenter are repositioned to relative pos
+					if (mc==lastBranch) mc->positionContents();
+				}
 			else
 				// Couldn't read relPos
 				return false;  
@@ -594,6 +598,10 @@
 	
 	if (!readOOAttr(a)) return false;
 
+	if (!a.value ("orgName").isEmpty() )
+	{
+		((FloatImageObj*)(lastFloat))->setOriginalFilename (a.value("orgName"));
+	}
 	return true;
 }