diff -r e3f722759c7e -r 340bc29da9a0 branchobj.cpp --- a/branchobj.cpp Wed May 20 15:40:14 2009 +0000 +++ b/branchobj.cpp Tue May 26 11:23:44 2009 +0000 @@ -33,7 +33,7 @@ // cout << "Const BranchObj (s,p)\n"; scene=s; setParObj (p); - if (treeItem->depth()==1) + if (treeItem->depth()==1) // FIXME-3 needed to recursively calc depth? // Calc angle to mapCenter if I am a mainbranch // needed for reordering the mainbranches clockwise // around mapcenter @@ -50,6 +50,7 @@ if (anim.isAnimated() ) { anim.setAnimated (false); + VymModel *model=treeItem->getModel(); model->stopAnimation (this); } @@ -86,8 +87,6 @@ absPos+=parObj->getChildPos(); } - setChildObj(this); - includeImagesVer=false; includeImagesHor=false; } @@ -153,7 +152,7 @@ // 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) + if (treeItem->depth()==1) // FIXME-3 needed to recursively calc depth? { // new parent is the mapcenter itself QPointF p= normalise ( QPointF (m.x() - o->getChildPos().x(), @@ -245,6 +244,7 @@ // Overloaded from LinkableMapObj // BranchObj can use color of heading + VymModel *model=treeItem->getModel(); if (model) { if (model->getMapLinkColorHint()==HeadingColor) @@ -254,13 +254,6 @@ } } -void BranchObj::setColorSubtree(QColor col) -{ - setColor (col); - for (int i=0; ibranchCount(); ++i) - treeItem->getBranchObjNum(i)->setColorSubtree(col); -} - void BranchObj::updateContentSize() { calcBBoxSize(); @@ -663,7 +656,7 @@ void BranchObj::alignRelativeTo (QPointF ref,bool alignSelf) { qreal th = bboxTotal.height(); - int depth=treeItem->depth(); + int depth=treeItem->depth(); // FIXME-3 needed to recursively calc depth? // TODO testing /* @@ -918,7 +911,11 @@ QString BranchObj::getSelectString() { - return model->getSelectString (this); + VymModel *model=treeItem->getModel(); + if (model) + return model->getSelectString (this); + else + return QString(); } void BranchObj::setAnimation(const AnimPoint &ap)