The rendering process, if the not sliced band is moved to a new page, has been changed

This commit is contained in:
Arin Alexander 2019-04-16 16:59:35 +03:00
parent 220dcc3edb
commit 271b765722

View File

@ -428,6 +428,7 @@ void ReportRender::replaceGroupsFunction(BandDesignIntf *band)
BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesignIntf* bandData, ReportRender::DataRenderMode mode, bool isLast)
{
QCoreApplication::processEvents();
bool bandIsSliced = false;
if (patternBand){
if (patternBand->isHeader())
@ -475,6 +476,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
m_reprintableBands.removeOne(patternBand);
if (bandClone->canBeSplitted(m_maxHeightByColumn[m_currentColumn])){
bandClone = sliceBand(bandClone, patternBand, isLast);
bandIsSliced = true;
} else {
qreal percent = (bandClone->height()-m_maxHeightByColumn[m_currentColumn])/(bandClone->height()/100);
if (bandClone->maxScalePercent()>=percent){
@ -504,6 +506,10 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
} else {
savePage();
startNewPage();
if (!bandIsSliced){
delete bandClone;
bandClone = renderData(patternBand);
}
}
if (!registerBand(bandClone)) {
BandDesignIntf* upperPart = dynamic_cast<BandDesignIntf*>(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn]));