1.1 --- a/branchobj.cpp Wed Jan 16 15:45:20 2008 +0000
1.2 +++ b/branchobj.cpp Fri Feb 01 15:28:35 2008 +0000
1.3 @@ -1424,6 +1424,28 @@
1.4 }
1.5
1.6
1.7 +QPolygonF BranchObj::shape()
1.8 +{
1.9 + QPolygonF p;
1.10 +
1.11 + QRectF r=getTotalBBox();
1.12 + if (orientation==LinkableMapObj::LeftOfCenter)
1.13 + p <<r.bottomLeft()
1.14 + <<r.topLeft()
1.15 + <<QPointF (bbox.topLeft().x(), r.topLeft().y() )
1.16 + <<bbox.topRight()
1.17 + <<bbox.bottomRight()
1.18 + <<QPointF (bbox.bottomLeft().x(), r.bottomLeft().y() ) ;
1.19 + else
1.20 + p <<r.bottomRight()
1.21 + <<r.topRight()
1.22 + <<QPointF (bbox.topRight().x(), r.topRight().y() )
1.23 + <<bbox.topLeft()
1.24 + <<bbox.bottomLeft()
1.25 + <<QPointF (bbox.bottomRight().x(), r.bottomRight().y() ) ;
1.26 + return p;
1.27 +}
1.28 +
1.29 QRectF BranchObj::getTotalBBox()
1.30 {
1.31 QRectF r=bbox;
2.1 --- a/branchobj.h Wed Jan 16 15:45:20 2008 +0000
2.2 +++ b/branchobj.h Fri Feb 01 15:28:35 2008 +0000
2.3 @@ -120,6 +120,7 @@
2.4 virtual void reposition();
2.5 virtual void unsetAllRepositionRequests();
2.6
2.7 + virtual QPolygonF shape(); //!< Returns arbitrary bounding polygon
2.8 virtual QRectF getTotalBBox(); // return BBox including childs
2.9 virtual QRectF getBBoxSizeWithChilds(); // return size of BBox including childs
2.10 virtual void calcBBoxSizeWithChilds(); // calc size of BBox including childs recursivly
3.1 --- a/mapcenterobj.cpp Wed Jan 16 15:45:20 2008 +0000
3.2 +++ b/mapcenterobj.cpp Fri Feb 01 15:28:35 2008 +0000
3.3 @@ -22,6 +22,7 @@
3.4 MapCenterObj::~MapCenterObj()
3.5 {
3.6 // cout << "Destr MapCenterObj\n";
3.7 + clear();
3.8 }
3.9
3.10 void MapCenterObj::clear()