diff -r c6908bc17d78 -r 04039e47ac74 branchitem.cpp --- a/branchitem.cpp Mon Apr 27 12:42:06 2009 +0000 +++ b/branchitem.cpp Tue Apr 28 09:51:48 2009 +0000 @@ -183,6 +183,12 @@ return vymLink; } +void BranchItem::setHeadingColor (QColor color) +{ + TreeItem::setHeadingColor (color); + if (lmo) ((BranchObj*)lmo)->setColor (color); +} + void BranchItem::unScroll() { if (tmpUnscrolled) resetTmpUnscroll(); @@ -266,26 +272,26 @@ } } -TreeItem* BranchItem::findMapItem (QPointF p, TreeItem* excludeLMO) +TreeItem* BranchItem::findMapItem (QPointF p, TreeItem* excludeTI) { // Search branches TreeItem *ti; for (int i=0; ifindMapItem(p, excludeLMO); + ti=getBranchNum(i)->findMapItem(p, excludeTI); if (ti != NULL) return ti; } // Search myself - if (getBranchObj()->isInClickBox (p) && (this != excludeLMO) && getBranchObj()->isVisibleObj() ) + if (getBranchObj()->isInClickBox (p) && (this != excludeTI) && getBranchObj()->isVisibleObj() ) return this; /* FIXME-2 // Search float images for (int i=0; iisInClickBox(p) && - (floatimage.at(i) != excludeLMO) && - floatimage.at(i)->getParObj()!= excludeLMO && + (floatimage.at(i) != excludeTI) && + floatimage.at(i)->getParObj()!= excludeTI && floatimage.at(i)->isVisibleObj() ) return floatimage.at(i)->getTreeItem(); */ @@ -331,6 +337,15 @@ newbo->setParObj(parent()->getLMO() ); newbo->setTreeItem (this); newbo->setDefAttr(BranchObj::NewBranch); + + + if (!getHeading().isEmpty() ) + { + newbo->updateHeading(); + newbo->setColor (headingColor); + } + + //newbo->updateLink(); //FIXME-3 lmo=newbo;