summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_route_groups.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-09 15:43:38 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-09 15:43:38 +0000
commitcc351b97a986fca48a6b3b631a292bf24efc5e41 (patch)
tree807515f8692bd705ebaab2f3c1548a22ee617fbf /gtk2_ardour/editor_route_groups.cc
parent5f6a9fa003e0267127e875621d406a69ae243219 (diff)
Fix collection of route groups.
git-svn-id: svn://localhost/ardour2/branches/3.0@5342 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_route_groups.cc')
-rw-r--r--gtk2_ardour/editor_route_groups.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc
index 89c87ee32f..ecb4efc055 100644
--- a/gtk2_ardour/editor_route_groups.cc
+++ b/gtk2_ardour/editor_route_groups.cc
@@ -666,6 +666,12 @@ EditorRouteGroups::connect_to_session (Session* s)
groups_changed ();
}
+struct CollectSorter {
+ bool operator () (Route* a, Route* b) {
+ return a->order_key (N_ ("editor")) < b->order_key (N_ ("editor"));
+ }
+};
+
/** Collect all members of a RouteGroup so that they are together in the Editor.
* @param g Group to collect.
*/
@@ -673,6 +679,7 @@ void
EditorRouteGroups::collect (RouteGroup* g)
{
list<Route*> routes = g->route_list ();
+ routes.sort (CollectSorter ());
int const N = routes.size ();
list<Route*>::iterator i = routes.begin ();
@@ -689,7 +696,7 @@ EditorRouteGroups::collect (RouteGroup* g)
int const k = r->order_key (N_ ("editor"));
if (*i == r.get()) {
-
+
if (coll == -1) {
coll = k;
diff = N - 1;