From 362303f7931a510b16ada637d585eedc873e3781 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 18 Apr 2017 15:42:39 +0200 Subject: FP8: Fix sort-order --- libs/surfaces/faderport8/faderport8.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'libs/surfaces/faderport8/faderport8.cc') 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 s) { struct FP8SortByNewDisplayOrder { - // return (a < b) + // return strict (a < b) bool operator () (const boost::shared_ptr & a, const boost::shared_ptr & 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; } }; -- cgit v1.2.3