0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 19:51:30 +03:00

Page free space calculation has been updated

This commit is contained in:
yanis60
2023-01-09 09:42:19 +00:00
committed by GitHub
parent f202c57a43
commit 920037d387

View File

@@ -707,14 +707,13 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){
if (page){
int height = 0;
foreach(BandDesignIntf* band, page->bands()){
if(band->type() == BandDesignIntf::Data)
{
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
}
else height += band->height();
}
return page->height() - height;
return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0);
} else return -1;
}