Band relocation has been fixed

This commit is contained in:
Arin Alexander
2018-07-13 02:25:10 +03:00
parent 6015c77619
commit af12120260
5 changed files with 44 additions and 5 deletions

View File

@@ -389,6 +389,19 @@ int BandDesignIntf::minChildIndex(BandDesignIntf::BandsType bandType){
return curIndex;
}
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));
}
}
return curIndex;
}
QList<BandDesignIntf *> BandDesignIntf::childrenByType(BandDesignIntf::BandsType type)
{
QList<BandDesignIntf*> resList;