1.1 --- a/branchobj.cpp Mon Aug 03 10:42:12 2009 +0000
1.2 +++ b/branchobj.cpp Thu Aug 06 10:42:17 2009 +0000
1.3 @@ -127,7 +127,7 @@
1.4 if (!parObjTmpBuf)
1.5 parObjTmpBuf=parObj;
1.6
1.7 - // ignore mapcenter and mainbranch
1.8 + // ignore mapcenter and mainbranch //FIXME-3 MCO meanwhile also could be relinked
1.9 if (pi_depth<2) off=0;
1.10 if (off==0)
1.11 link2ParPos=false;
1.12 @@ -135,17 +135,17 @@
1.13 link2ParPos=true;
1.14 parObj=o;
1.15
1.16 - // FIXME-2 depth=parObj->getDepth()+1;
1.17 -
1.18 // setLinkStyle calls updateLinkGeometry, only set it once
1.19 - if (style!=getDefLinkStyle() ) setLinkStyle (getDefLinkStyle());
1.20 + //LinkableMapObj::Style ls=getDefLinkStyle (lmo->getTreeItem() );
1.21 + //if (style!=ls ) setLinkStyle (ls);
1.22 + setLinkStyle (lmo->getDefLinkStyle (lmo->getTreeItem()));
1.23
1.24 // Move temporary to new position at destination
1.25 // Usually the positioning would be done by reposition(),
1.26 // but then also the destination branch would "Jump" around...
1.27 // Better just do it approximately
1.28 - if (treeItem->depth()==1) // FIXME-3 needed to recursively calc depth?
1.29 - { // new parent is the mapcenter itself
1.30 + if (parObj->getTreeItem()->depth()==0)
1.31 + { // new parent is a mapcenter
1.32
1.33 QPointF p= normalise ( QPointF (m.x() - o->getChildPos().x(),
1.34 m.y() - o->getChildPos().y() ));
1.35 @@ -192,8 +192,7 @@
1.36 link2ParPos=false;
1.37 parObj=parObjTmpBuf;
1.38 parObjTmpBuf=NULL;
1.39 - //FIXME-2 depth=parObj->getDepth()+1;
1.40 - setLinkStyle (getDefLinkStyle() );
1.41 + setLinkStyle (getDefLinkStyle(treeItem->parent() ) );
1.42 updateLinkGeometry();
1.43 }
1.44 }
1.45 @@ -588,9 +587,8 @@
1.46 case 1: fontsize=12; break;
1.47 default: fontsize=10; break;
1.48 }
1.49 -
1.50 + setLinkStyle(getDefLinkStyle(treeItem->parent() ));
1.51 setLinkColor ();
1.52 - setLinkStyle(getDefLinkStyle());
1.53 QFont font("Sans Serif,8,-1,5,50,0,0,0,0,0");
1.54 font.setPointSize(fontsize);
1.55 heading->setFont(font );