mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-01-11 20:31:04 +03:00
Bands relocation has been fixed
This commit is contained in:
parent
37cbc134d1
commit
533eb7efa0
@ -372,7 +372,7 @@ int BandDesignIntf::maxChildIndex(BandDesignIntf::BandsType bandType) const{
|
|||||||
int BandDesignIntf::maxChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands) const{
|
int BandDesignIntf::maxChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands) const{
|
||||||
int curIndex = bandIndex();
|
int curIndex = bandIndex();
|
||||||
foreach(BandDesignIntf* childBand, childBands()){
|
foreach(BandDesignIntf* childBand, childBands()){
|
||||||
if (!ignoredBands.contains(childBand->bandType()) && childBand->bandIndex()>bandIndex()){
|
if (!ignoredBands.contains(childBand->bandType())){
|
||||||
curIndex = std::max(curIndex,childBand->maxChildIndex(ignoredBands));
|
curIndex = std::max(curIndex,childBand->maxChildIndex(ignoredBands));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,17 +201,22 @@ int PageItemDesignIntf::calcBandIndex(BandDesignIntf::BandsType bandType, BandDe
|
|||||||
|
|
||||||
int bandIndex=-1;
|
int bandIndex=-1;
|
||||||
qSort(m_bands.begin(),m_bands.end(),bandSortBandLessThenByIndex);
|
qSort(m_bands.begin(),m_bands.end(),bandSortBandLessThenByIndex);
|
||||||
foreach(BandDesignIntf* band,m_bands){
|
if (bandType != BandDesignIntf::Data){
|
||||||
if ((band->bandType() == BandDesignIntf::GroupHeader) && ( band->bandType() > bandType)) break;
|
foreach(BandDesignIntf* band,m_bands){
|
||||||
if ((band->bandType() <= bandType)){
|
if ((band->bandType() == BandDesignIntf::GroupHeader) && ( band->bandType() > bandType)) break;
|
||||||
if (bandIndex <= band->bandIndex()) {
|
if ((band->bandType() <= bandType)){
|
||||||
if (bandType != BandDesignIntf::Data){
|
if (bandIndex <= band->bandIndex()) {
|
||||||
bandIndex=band->maxChildIndex(bandType)+1;
|
bandIndex=band->maxChildIndex(bandType)+1;
|
||||||
} else {
|
|
||||||
bandIndex=band->maxChildIndex()+1;
|
|
||||||
}
|
}
|
||||||
}
|
} else { increaseBandIndex = true; break;}
|
||||||
} else { increaseBandIndex = true; break;}
|
}
|
||||||
|
} else {
|
||||||
|
int maxChildIndex = 0;
|
||||||
|
foreach(BandDesignIntf* band, m_bands){
|
||||||
|
if (band->bandType() == BandDesignIntf::Data)
|
||||||
|
maxChildIndex = std::max(maxChildIndex, band->maxChildIndex());
|
||||||
|
}
|
||||||
|
bandIndex = std::max(bandIndex, maxChildIndex+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bandIndex==-1) {
|
if (bandIndex==-1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user