1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-31 16:09:28 +02:00

More careful sorting of effects...

... when grouping by two criteria (publisher and name or type and name).

Use a stable sort for the second sort so that the minor sort (done first) is
sure not to be destoyed.

Maybe this never mattered (depending on the implementation of std::sort and
its threshold for doing small sorts by insertion).
This commit is contained in:
Paul Licameli 2018-10-19 08:03:07 -04:00
parent c067ad5b37
commit 52672ed5e2

View File

@ -1910,7 +1910,8 @@ void MenuCreator::PopulateEffectsMenu(CommandManager* c,
comp1 = comp2 = SortEffectsByName;
std::sort( defplugs.begin(), defplugs.end(), comp1 );
std::sort( optplugs.begin(), optplugs.end(), comp2 );
if ( comp1 != comp2 )
std::stable_sort( optplugs.begin(), optplugs.end(), comp2 );
AddEffectMenuItems(c, defplugs, batchflags, realflags, true);