Sort plugin presets by default
This commit is contained in:
parent
6725e8b661
commit
10d12599dd
@ -228,6 +228,14 @@ public:
|
||||
return uri != a.uri || label != a.label;
|
||||
}
|
||||
|
||||
bool operator< (PresetRecord const& a) const
|
||||
{
|
||||
if (label == a.label) {
|
||||
return uri < a.uri;
|
||||
}
|
||||
return label < a.label;
|
||||
}
|
||||
|
||||
std::string uri;
|
||||
std::string label;
|
||||
std::string description;
|
||||
|
@ -2424,6 +2424,7 @@ AUPluginInfo::get_presets (bool user_only) const
|
||||
}
|
||||
|
||||
if (user_only) {
|
||||
std::sort (p.begin (), p.end();
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -2460,6 +2461,7 @@ AUPluginInfo::get_presets (bool user_only) const
|
||||
CFRelease (presets);
|
||||
unit->Uninitialize ();
|
||||
|
||||
std::sort (p.begin (), p.end ());
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -727,6 +727,8 @@ LadspaPluginInfo::get_presets (bool /*user_only*/) const
|
||||
}
|
||||
lrdf_free_uris(set_uris);
|
||||
}
|
||||
|
||||
std::sort (p.begin (), p.end ());
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
@ -3720,6 +3720,8 @@ LV2PluginInfo::get_presets (bool user_only) const
|
||||
lilv_node_free(pset_Preset);
|
||||
lilv_node_free(lv2_appliesTo);
|
||||
|
||||
std::sort (p.begin (), p.end ());
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -477,6 +477,8 @@ Plugin::get_presets ()
|
||||
p.push_back (i->second);
|
||||
}
|
||||
|
||||
std::sort (p.begin(), p.end());
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -1002,6 +1002,8 @@ VST3PluginInfo::get_presets (bool user_only) const
|
||||
p.push_back (Plugin::PresetRecord (uri, preset_name, is_user));
|
||||
}
|
||||
|
||||
std::sort (p.begin (), p.end ());
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user