mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +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 curIndex = bandIndex();
|
||||
foreach(BandDesignIntf* childBand, childBands()){
|
||||
if (!ignoredBands.contains(childBand->bandType()) && childBand->bandIndex()>bandIndex()){
|
||||
if (!ignoredBands.contains(childBand->bandType())){
|
||||
curIndex = std::max(curIndex,childBand->maxChildIndex(ignoredBands));
|
||||
}
|
||||
}
|
||||
|
@ -201,17 +201,22 @@ int PageItemDesignIntf::calcBandIndex(BandDesignIntf::BandsType bandType, BandDe
|
||||
|
||||
int bandIndex=-1;
|
||||
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)){
|
||||
if (bandIndex <= band->bandIndex()) {
|
||||
if (bandType != BandDesignIntf::Data){
|
||||
if (bandType != BandDesignIntf::Data){
|
||||
foreach(BandDesignIntf* band,m_bands){
|
||||
if ((band->bandType() == BandDesignIntf::GroupHeader) && ( band->bandType() > bandType)) break;
|
||||
if ((band->bandType() <= bandType)){
|
||||
if (bandIndex <= band->bandIndex()) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user