From 271b765722ec46a78e97b27562187823fa1a5e01 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 16 Apr 2019 16:59:35 +0300 Subject: [PATCH] The rendering process, if the not sliced band is moved to a new page, has been changed --- limereport/lrreportrender.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index e75bd33..fc314d9 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -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()) @@ -474,7 +475,8 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign if (patternBand && patternBand->isHeader() && patternBand->reprintOnEachPage()) m_reprintableBands.removeOne(patternBand); if (bandClone->canBeSplitted(m_maxHeightByColumn[m_currentColumn])){ - bandClone = sliceBand(bandClone,patternBand,isLast); + 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(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn]));