branchobj.cpp
changeset 793 cac93797c580
parent 792 7d67be709091
child 794 d922fb6ea482
     1.1 --- a/branchobj.cpp	Tue Sep 08 12:15:39 2009 +0000
     1.2 +++ b/branchobj.cpp	Wed Sep 09 12:57:06 2009 +0000
     1.3 @@ -713,6 +713,19 @@
     1.4  	return bboxTotal;
     1.5  }
     1.6  
     1.7 +ConvexPolygon BranchObj::getBoundingPolygon()
     1.8 +{
     1.9 +	if (treeItem->branchCount()==0)
    1.10 +		return MapObj::getBoundingPolygon();
    1.11 +
    1.12 +	QPolygonF p;
    1.13 +	p<<bboxTotal.topLeft();
    1.14 +	p<<bboxTotal.topRight();
    1.15 +	p<<bboxTotal.bottomRight();
    1.16 +	p<<bboxTotal.bottomLeft();
    1.17 +	return p;
    1.18 +}
    1.19 +
    1.20  void BranchObj::calcBBoxSizeWithChildren()
    1.21  {	
    1.22  	// This is initially called only from reposition and