diff -r c2ce9944148c -r 0bba81dde1bc branchobj.cpp --- a/branchobj.cpp Wed Feb 10 13:48:42 2010 +0000 +++ b/branchobj.cpp Fri Feb 19 13:47:03 2010 +0000 @@ -39,18 +39,6 @@ model->stopAnimation (this); } - // Check, if this branch was the last child to be deleted - // If so, unset the scrolled flags in parent // FIXME-2 better do this in model? - - /* - BranchObj *po=(BranchObj*)parObj; - BranchObj *bo; - if (po) - { - bo=((BranchObj*)parObj)->getLastBranch(); - if (bo) po->unScroll(); - } - */ clear(); } @@ -465,11 +453,12 @@ heading->setFont(font ); if (mod==NewBranch && !keepFrame) - if (treeItem->depth()==0) - setFrameType (FrameObj::Rectangle); - else - setFrameType (FrameObj::NoFrame); - + { + if (treeItem->depth()==0) + setFrameType (FrameObj::Rectangle); + else + setFrameType (FrameObj::NoFrame); + } if (mod==NewBranch) setColor (treeItem->getHeadingColor() ); else @@ -630,31 +619,6 @@ treeItem->getBranchObjNum(i)->unsetAllRepositionRequests(); } - -QRectF BranchObj::getTotalBBox() // FIXME-2 not really needed, get rid of this -{ - QRectF r=bbox; - - if ( ((BranchItem*)treeItem)->isScrolled() ) return r; - -/* FIXME-2 really include children _here_ ? likely not needed anymore, but done in TreeItem */ - for (int i=0; ibranchCount(); ++i) - if (!treeItem->getBranchNum(i)->isHidden()) - r=addBBox(treeItem->getBranchObjNum(i)->getTotalBBox(),r); - -/* FIXME-3 lots of occurences of treeItem->getBranchObjNum(i) in branchobj.cpp - better check if they are not NULL and maybe simplify... - (have been NULL at least in calcBBoxSizeWithChilds...) -*/ - -/* FIXME-2 in - for (int i=0; iimageCount(); ++i - if (!treeItem->isHidden()) - r=addBBox(treeItem->getImageObjNum(i)->getTotalBBox(),r); -*/ - return r; -} - QRectF BranchObj::getBBoxSizeWithChildren() { return bboxTotal; @@ -678,7 +642,7 @@ return MapObj::getBoundingPolygon(); } - calcBBoxSizeWithChildren(); //FIXME-2 really needed? + calcBBoxSizeWithChildren(); //FIXME-3 really needed? QPolygonF p; p<