From 3edd101d52b26f3e90e5ec26f383d810bd8902e9 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 15 Jul 2016 11:30:14 +0300 Subject: [PATCH] The bands insertion order has been fixed --- limereport/lrpageitemdesignintf.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index 0d19a7b..e009d5e 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -200,8 +200,9 @@ int PageItemDesignIntf::calcBandIndex(BandDesignIntf::BandsType bandType, BandDe qSort(m_bands.begin(),m_bands.end(),bandSortBandLessThenByIndex); foreach(BandDesignIntf* band,m_bands){ if ((band->bandType()==BandDesignIntf::GroupHeader)&&(band->bandType()>bandType)) break; - if ((band->bandType()>bandType)) break; - if (bandIndex<=band->bandIndex()) bandIndex=band->maxChildIndex()+1; + if ((band->bandType()<=bandType)){ + if (bandIndex<=band->bandIndex()) bandIndex=band->maxChildIndex()+1; + } } if (bandIndex==-1) { @@ -218,7 +219,7 @@ int PageItemDesignIntf::calcBandIndex(BandDesignIntf::BandsType bandType, BandDe switch (bandType) { case BandDesignIntf::SubDetailBand: - bandIndex = parentBand->bandIndex() + 1; + bandIndex = parentBand->maxChildIndex() + 1; increaseBandIndex = true; break; case BandDesignIntf::SubDetailHeader: