Height calculation has been fixed

This commit is contained in:
Arin Alexander
2016-04-20 20:59:33 +04:00
parent 6a25ac752f
commit fa89f21930
5 changed files with 48 additions and 12 deletions

View File

@@ -581,7 +581,8 @@ qreal BandDesignIntf::findMaxBottom()
foreach(QGraphicsItem* item,childItems()){
BaseDesignIntf* subItem = dynamic_cast<BaseDesignIntf *>(item);
if(subItem)
if (subItem->geometry().bottom()>maxBottom) maxBottom=subItem->geometry().bottom();
if ( subItem->isVisible() && (subItem->geometry().bottom()>maxBottom) )
maxBottom=subItem->geometry().bottom();
}
return maxBottom;
}
@@ -789,6 +790,9 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
{
qreal spaceBorder=0;
if (keepBottomSpaceOption()) spaceBorder=height()-findMaxBottom();
if (borderLines()!=0){
spaceBorder += borderLineSize();
}
snapshotItemsLayout();
arrangeSubItems(pass, dataManager);
if (autoHeight()){