mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-22 10:27:32 +03:00
Finish 1.4.124
# Conflicts: # limereport/lrbanddesignintf.h # limereport/lrpagedesignintf.cpp # limereport/lrpageitemdesignintf.h # translations/limereport_zh.ts
This commit is contained in:
@@ -425,10 +425,23 @@ int BandDesignIntf::maxChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands)
|
||||
return curIndex;
|
||||
}
|
||||
|
||||
int BandDesignIntf::rootIndex(BandDesignIntf* parentBand)
|
||||
{
|
||||
return rootBand(parentBand)->bandIndex();
|
||||
}
|
||||
|
||||
BandDesignIntf *BandDesignIntf::rootBand(BandDesignIntf* parentBand)
|
||||
{
|
||||
BandDesignIntf* currentBand = this;
|
||||
while (currentBand->parentBand() && currentBand->parentBand() != parentBand)
|
||||
currentBand = currentBand->parentBand();
|
||||
return currentBand;
|
||||
}
|
||||
|
||||
int BandDesignIntf::minChildIndex(BandDesignIntf::BandsType bandType){
|
||||
int curIndex = bandIndex();
|
||||
foreach(BandDesignIntf* childBand, childBands()){
|
||||
if (curIndex>childBand->bandIndex() && (childBand->bandType()>bandType)){
|
||||
if (curIndex > childBand->bandIndex() && (childBand->bandType() > bandType)){
|
||||
curIndex = childBand->bandIndex();
|
||||
}
|
||||
}
|
||||
@@ -440,7 +453,7 @@ int BandDesignIntf::minChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands)
|
||||
int curIndex = bandIndex();
|
||||
foreach(BandDesignIntf* childBand, childBands()){
|
||||
if (!ignoredBands.contains(childBand->bandType()) && childBand->bandIndex() < bandIndex()){
|
||||
curIndex = std::min(curIndex, childBand->maxChildIndex(ignoredBands));
|
||||
curIndex = std::min(curIndex, childBand->minChildIndex(ignoredBands));
|
||||
}
|
||||
}
|
||||
return curIndex;
|
||||
|
Reference in New Issue
Block a user