diff -r 5987f9f15bac -r 6269016c9905 branchobj.cpp --- a/branchobj.cpp Mon Aug 03 10:42:12 2009 +0000 +++ b/branchobj.cpp Thu Aug 06 10:42:17 2009 +0000 @@ -127,7 +127,7 @@ if (!parObjTmpBuf) parObjTmpBuf=parObj; - // ignore mapcenter and mainbranch + // ignore mapcenter and mainbranch //FIXME-3 MCO meanwhile also could be relinked if (pi_depth<2) off=0; if (off==0) link2ParPos=false; @@ -135,17 +135,17 @@ link2ParPos=true; parObj=o; - // FIXME-2 depth=parObj->getDepth()+1; - // setLinkStyle calls updateLinkGeometry, only set it once - if (style!=getDefLinkStyle() ) setLinkStyle (getDefLinkStyle()); + //LinkableMapObj::Style ls=getDefLinkStyle (lmo->getTreeItem() ); + //if (style!=ls ) setLinkStyle (ls); + setLinkStyle (lmo->getDefLinkStyle (lmo->getTreeItem())); // Move temporary to new position at destination // Usually the positioning would be done by reposition(), // but then also the destination branch would "Jump" around... // Better just do it approximately - if (treeItem->depth()==1) // FIXME-3 needed to recursively calc depth? - { // new parent is the mapcenter itself + if (parObj->getTreeItem()->depth()==0) + { // new parent is a mapcenter QPointF p= normalise ( QPointF (m.x() - o->getChildPos().x(), m.y() - o->getChildPos().y() )); @@ -192,8 +192,7 @@ link2ParPos=false; parObj=parObjTmpBuf; parObjTmpBuf=NULL; - //FIXME-2 depth=parObj->getDepth()+1; - setLinkStyle (getDefLinkStyle() ); + setLinkStyle (getDefLinkStyle(treeItem->parent() ) ); updateLinkGeometry(); } } @@ -588,9 +587,8 @@ case 1: fontsize=12; break; default: fontsize=10; break; } - + setLinkStyle(getDefLinkStyle(treeItem->parent() )); setLinkColor (); - setLinkStyle(getDefLinkStyle()); QFont font("Sans Serif,8,-1,5,50,0,0,0,0,0"); font.setPointSize(fontsize); heading->setFont(font );