Improve the sorting of the effects list
Sort by: * category ** exclusive group *** name Thus we have an alphabetic order of all categories, in the categories we have again an alphabetic order of all effects in the same group and the effects in one group are listed at the bottom of the category. REVIEW: 116753
This commit is contained in:
parent
8573bb6bed
commit
38e18a1d4c
1 changed files with 6 additions and 0 deletions
|
@ -204,6 +204,12 @@ void EffectModel::loadEffects()
|
|||
}
|
||||
|
||||
qSort(m_effectsList.begin(), m_effectsList.end(), [](const EffectData &a, const EffectData &b) {
|
||||
if (a.category == b.category) {
|
||||
if (a.exclusiveGroup == b.exclusiveGroup) {
|
||||
return a.name < b.name;
|
||||
}
|
||||
return a.exclusiveGroup < b.exclusiveGroup;
|
||||
}
|
||||
return a.category < b.category;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue