diff options
author | Robin Gareus <robin@gareus.org> | 2017-04-18 15:42:39 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-04-18 16:09:44 +0200 |
commit | 362303f7931a510b16ada637d585eedc873e3781 (patch) | |
tree | e914f65435d5512e53474573ff44fecdd2021849 /libs/surfaces/faderport8/faderport8.cc | |
parent | a372fcbe51c9ea52149187ea753f32a63d3940ac (diff) |
FP8: Fix sort-order
Diffstat (limited to 'libs/surfaces/faderport8/faderport8.cc')
-rw-r--r-- | libs/surfaces/faderport8/faderport8.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index be5f60a824..08e2cc8560 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -836,7 +836,7 @@ static bool flt_instrument (boost::shared_ptr<Stripable> s) { struct FP8SortByNewDisplayOrder { - // return (a < b) + // return strict (a < b) bool operator () (const boost::shared_ptr<Stripable> & a, const boost::shared_ptr<Stripable> & b) const { if (a->presentation_info().flags () == b->presentation_info().flags ()) { @@ -846,36 +846,34 @@ struct FP8SortByNewDisplayOrder int cmp_a = 0; int cmp_b = 0; + // see also gtk2_ardour/route_sorter.h if (a->presentation_info().flags () & ARDOUR::PresentationInfo::VCA) { - cmp_a = 1; + cmp_a = 2; } #ifdef MIXBUS else if (a->presentation_info().flags () & ARDOUR::PresentationInfo::MasterOut) { cmp_a = 3; } else if (a->presentation_info().flags () & ARDOUR::PresentationInfo::Mixbus || a->mixbus()) { - cmp_a = 2; + cmp_a = 1; } #endif if (b->presentation_info().flags () & ARDOUR::PresentationInfo::VCA) { - cmp_b = 1; + cmp_b = 2; } #ifdef MIXBUS else if (b->presentation_info().flags () & ARDOUR::PresentationInfo::MasterOut) { cmp_b = 3; } else if (b->presentation_info().flags () & ARDOUR::PresentationInfo::Mixbus || b->mixbus()) { - cmp_b = 2; + cmp_b = 1; } #endif -#ifdef MIXBUS - // this can happen with older MB sessions (no PresentationInfo::Mixbus flag) if (cmp_a == cmp_b) { return a->presentation_info().order() < b->presentation_info().order(); } -#endif return cmp_a < cmp_b; } }; |