Playlist UI tweaks: change sort order to use pgroup when one is available
This commit is contained in:
@@ -43,7 +43,13 @@ class RouteUI;
|
||||
|
||||
struct PlaylistSorterByID {
|
||||
bool operator() (boost::shared_ptr<ARDOUR::Playlist> a, boost::shared_ptr<ARDOUR::Playlist> b) const {
|
||||
return a->sort_id() < b->sort_id();
|
||||
if (a->pgroup_id().length() && b->pgroup_id().length()) {
|
||||
return (a->id() < b->id()); /*both plists have pgroup-id: use IDs which are sequentially generated */
|
||||
} else if (!a->pgroup_id().length() && !b->pgroup_id().length()) {
|
||||
return (a->sort_id() < b->sort_id()); /*old session: neither plist has a pgroup-id: use prior sort_id calculation */ /*DEPRECATED*/
|
||||
} else {
|
||||
return (a->pgroup_id().length() < b->pgroup_id().length()); /*mix of old & new: old ones go on top */
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user