linkablemapobj.cpp
changeset 775 6e4b586aa88a
parent 773 340bc29da9a0
child 779 1fb50e79661c
     1.1 --- a/linkablemapobj.cpp	Tue May 26 11:24:51 2009 +0000
     1.2 +++ b/linkablemapobj.cpp	Wed Jun 03 20:37:17 2009 +0000
     1.3 @@ -447,6 +447,19 @@
     1.4  
     1.5  	// updateLink is called from move, but called from constructor we don't
     1.6  	// have parents yet...
     1.7 +
     1.8 +	if (!parObj)	
     1.9 +	{
    1.10 +		// If I am a mapcenter, set childPos to middle of MapCenterObj
    1.11 +		childPos.setX( clickBox.topLeft().x() + clickBox.width()/2 );
    1.12 +		childPos.setY( clickBox.topLeft().y() + clickBox.height()/2 );
    1.13 +		parPos=childPos;		
    1.14 +		// Redraw links to children
    1.15 +		for (int i=0; i<treeItem->branchCount(); ++i)
    1.16 +			treeItem->getBranchObjNum(i)->updateLink();
    1.17 +		return;	
    1.18 +	}
    1.19 +
    1.20  	if (style==UndefinedStyle) return;	
    1.21  
    1.22  	switch (linkpos)