1.1 --- a/branchitem.cpp Mon Apr 27 12:42:06 2009 +0000
1.2 +++ b/branchitem.cpp Tue Apr 28 09:51:48 2009 +0000
1.3 @@ -183,6 +183,12 @@
1.4 return vymLink;
1.5 }
1.6
1.7 +void BranchItem::setHeadingColor (QColor color)
1.8 +{
1.9 + TreeItem::setHeadingColor (color);
1.10 + if (lmo) ((BranchObj*)lmo)->setColor (color);
1.11 +}
1.12 +
1.13 void BranchItem::unScroll()
1.14 {
1.15 if (tmpUnscrolled) resetTmpUnscroll();
1.16 @@ -266,26 +272,26 @@
1.17 }
1.18 }
1.19
1.20 -TreeItem* BranchItem::findMapItem (QPointF p, TreeItem* excludeLMO)
1.21 +TreeItem* BranchItem::findMapItem (QPointF p, TreeItem* excludeTI)
1.22 {
1.23 // Search branches
1.24 TreeItem *ti;
1.25 for (int i=0; i<branchCount(); ++i)
1.26 {
1.27 - ti=getBranchNum(i)->findMapItem(p, excludeLMO);
1.28 + ti=getBranchNum(i)->findMapItem(p, excludeTI);
1.29 if (ti != NULL) return ti;
1.30 }
1.31
1.32
1.33 // Search myself
1.34 - if (getBranchObj()->isInClickBox (p) && (this != excludeLMO) && getBranchObj()->isVisibleObj() )
1.35 + if (getBranchObj()->isInClickBox (p) && (this != excludeTI) && getBranchObj()->isVisibleObj() )
1.36 return this;
1.37
1.38 /* FIXME-2 // Search float images
1.39 for (int i=0; i<floatimage.size(); ++i )
1.40 if (floatimage.at(i)->isInClickBox(p) &&
1.41 - (floatimage.at(i) != excludeLMO) &&
1.42 - floatimage.at(i)->getParObj()!= excludeLMO &&
1.43 + (floatimage.at(i) != excludeTI) &&
1.44 + floatimage.at(i)->getParObj()!= excludeTI &&
1.45 floatimage.at(i)->isVisibleObj()
1.46 ) return floatimage.at(i)->getTreeItem();
1.47 */
1.48 @@ -331,6 +337,15 @@
1.49 newbo->setParObj(parent()->getLMO() );
1.50 newbo->setTreeItem (this);
1.51 newbo->setDefAttr(BranchObj::NewBranch);
1.52 +
1.53 +
1.54 + if (!getHeading().isEmpty() )
1.55 + {
1.56 + newbo->updateHeading();
1.57 + newbo->setColor (headingColor);
1.58 + }
1.59 +
1.60 +
1.61 //newbo->updateLink(); //FIXME-3
1.62
1.63 lmo=newbo;