summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_sorter.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-03-02 12:13:45 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:39 -0400
commit8ce39c891bece4845075cfb03c45c80e5177c17a (patch)
treeeab98c4dbcc65bc571c29cacf356fbe093d1e247 /gtk2_ardour/route_sorter.h
parent75b327964bafcccf15e83800132053524aebdf89 (diff)
change sort ordering model in mixer and editor
This allows correct reordering of the mixer "track_model" even when non-route elements are present. This isn't really utilized in the Editor at present because we do not show VCAs there at all, but it will become important in the future when we represent VCA automation there
Diffstat (limited to 'gtk2_ardour/route_sorter.h')
-rw-r--r--gtk2_ardour/route_sorter.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/gtk2_ardour/route_sorter.h b/gtk2_ardour/route_sorter.h
index c203afa188..1450a2c09b 100644
--- a/gtk2_ardour/route_sorter.h
+++ b/gtk2_ardour/route_sorter.h
@@ -24,25 +24,19 @@
#include <stdint.h>
#include <vector>
-namespace ARDOUR {
- class Route;
-}
-
-struct RoutePlusOrderKey {
- boost::shared_ptr<ARDOUR::Route> route; /* we don't really need this, but its handy to keep around */
+struct OrderKeys {
uint32_t old_display_order;
uint32_t new_display_order;
- RoutePlusOrderKey (boost::shared_ptr<ARDOUR::Route> r, uint32_t ok, uint32_t nk)
- : route (r)
- , old_display_order (ok)
- , new_display_order (nk) {}
+ OrderKeys (uint32_t ok, uint32_t nk)
+ : old_display_order (ok)
+ , new_display_order (nk) {}
};
-typedef std::vector<RoutePlusOrderKey> OrderKeySortedRoutes;
+typedef std::vector<OrderKeys> OrderingKeys;
struct SortByNewDisplayOrder {
- bool operator() (const RoutePlusOrderKey& a, const RoutePlusOrderKey& b) {
+ bool operator() (const OrderKeys& a, const OrderKeys& b) {
return a.new_display_order < b.new_display_order;
}
};