mapeditor.cpp
changeset 818 25ee6b988b73
parent 817 b486ffd0fa11
child 819 8f987e376035
     1.1 --- a/mapeditor.cpp	Mon Dec 14 10:17:55 2009 +0000
     1.2 +++ b/mapeditor.cpp	Tue Dec 15 09:14:59 2009 +0000
     1.3 @@ -403,13 +403,15 @@
     1.4  	}
     1.5  }
     1.6  
     1.7 -QRectF MapEditor::getTotalBBox()	//FIXME-2 needed e.g. for image export
     1.8 +QRectF MapEditor::getTotalBBox()	
     1.9  {
    1.10  	QRectF r;
    1.11 -/*
    1.12 -	for (int i=0;i<rootItem->branchCount(); i++)
    1.13 -		r=addBBox (rootItem->getBranchNum(i)->getTotalBBox(), r);
    1.14 -*/ 
    1.15 +	BranchObj *bo;
    1.16 +	for (int i=0;i<model->getRootItem()->branchCount(); i++)
    1.17 +	{
    1.18 +		bo=(BranchObj*)(model->getRootItem()->getBranchNum(i)->getLMO());
    1.19 +		if (bo) r=addBBox (bo->getTotalBBox(), r);
    1.20 +	}
    1.21  	return r;	
    1.22  }
    1.23  
    1.24 @@ -417,7 +419,7 @@
    1.25  QPixmap MapEditor::getPixmap()
    1.26  {
    1.27  	QRectF mapRect=getTotalBBox();
    1.28 -	QPixmap pix((int)mapRect.width()+2,(int)mapRect.height()+1);
    1.29 +	QPixmap pix((int)mapRect.width()+2,(int)mapRect.height()+2);
    1.30  	QPainter pp (&pix);
    1.31  	
    1.32  	pp.setRenderHints(renderHints());