summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_sorter.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-22 01:38:55 +0100
committerRobin Gareus <robin@gareus.org>2016-12-22 01:38:55 +0100
commit851cdf26c902ec3ea7d3a3449b5fd1e3d8a686a4 (patch)
tree55e33d5f509096e615ad53d9bafd9d17dd914f3f /gtk2_ardour/route_sorter.h
parent7f88207b431ece3f19fead89d264cbe5cbdb93a5 (diff)
Display VCAs at the end of the Track/Bus list
Diffstat (limited to 'gtk2_ardour/route_sorter.h')
-rw-r--r--gtk2_ardour/route_sorter.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/gtk2_ardour/route_sorter.h b/gtk2_ardour/route_sorter.h
index e84788243c..bba7424dc1 100644
--- a/gtk2_ardour/route_sorter.h
+++ b/gtk2_ardour/route_sorter.h
@@ -29,17 +29,33 @@
struct OrderKeys {
uint32_t old_display_order;
uint32_t new_display_order;
+ uint32_t compare_order;
- OrderKeys (uint32_t ok, uint32_t nk)
+ OrderKeys (uint32_t ok, boost::shared_ptr<ARDOUR::Stripable> s, uint32_t cmp_max)
: old_display_order (ok)
- , new_display_order (nk) {}
+ {
+ new_display_order = s->presentation_info().order();
+ compare_order = new_display_order;
+
+ if (s->presentation_info().flags () & ARDOUR::PresentationInfo::VCA) {
+ compare_order += 2 * cmp_max;
+ }
+#ifdef MIXBUS
+ if (s->presentation_info().flags () & ARDOUR::PresentationInfo::Mixbus || s->mixbus()) {
+ compare_order += cmp_max;
+ }
+ if (s->presentation_info().flags () & ARDOUR::PresentationInfo::MasterOut) {
+ compare_order += 3 * cmp_max;
+ }
+#endif
+ }
};
typedef std::vector<OrderKeys> OrderingKeys;
struct SortByNewDisplayOrder {
bool operator() (const OrderKeys& a, const OrderKeys& b) {
- return a.new_display_order < b.new_display_order;
+ return a.compare_order < b.compare_order;
}
};