From c52a0240c64068b9c5b3ddafbd47626a8459f11f Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 2 Aug 2016 20:32:52 +0300 Subject: [PATCH] splitting instead changing height --- limereport/lrreportrender.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index b39518a..0a823a3 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -325,8 +325,9 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen if (percentmaxScalePercent()){ percent += 2; bandClone->setScale((100-percent)/100); - bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); - registerBand(bandClone); + BandDesignIntf* upperPart = dynamic_cast(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn])); + registerBand(upperPart); + delete bandClone; } } else { @@ -341,8 +342,9 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen startNewPage(); } if (!registerBand(bandClone)) { - bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); - registerBand(bandClone); + BandDesignIntf* upperPart = dynamic_cast(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn])); + registerBand(upperPart); + delete bandClone; }; } else { bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]);