mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
Merge pull request #425 from yanis60/master
Page free space calculation has been updated
This commit is contained in:
commit
4cbb1a1e66
@ -707,14 +707,13 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){
|
|||||||
if (page){
|
if (page){
|
||||||
int height = 0;
|
int height = 0;
|
||||||
foreach(BandDesignIntf* band, page->bands()){
|
foreach(BandDesignIntf* band, page->bands()){
|
||||||
|
|
||||||
if(band->type() == BandDesignIntf::Data)
|
if(band->type() == BandDesignIntf::Data)
|
||||||
{
|
{
|
||||||
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
|
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
|
||||||
}
|
}
|
||||||
else height += band->height();
|
else height += band->height();
|
||||||
}
|
}
|
||||||
return page->height() - height;
|
return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0);
|
||||||
} else return -1;
|
} else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user