summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-05-16 13:06:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-05-16 13:06:55 +0000
commit43798a7c259660b53cd3edc7feca17cf41faf13b (patch)
treedb0b5ea102b3636680b9a9ecfaf90a1f3f0be2be /gtk2_ardour/route_time_axis.cc
parent0a9cef7720ed9bd83442d284d18831437b80a482 (diff)
sane naming scheme for combined regions; fix deadlock when nesting to more than one level
git-svn-id: svn://localhost/ardour2/branches/3.0@9519 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r--gtk2_ardour/route_time_axis.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 449718d15a..81dbefcd29 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -2479,9 +2479,10 @@ RouteTimeAxisView::create_gain_automation_child (const Evoral::Parameter& param,
}
static
-void add_region_to_list (RegionView* rv, Playlist::RegionList* l)
+void add_region_to_list (RegionView* rv, Playlist::RegionList* l, uint32_t* max_level)
{
l->push_back (rv->region());
+ *max_level = max (*max_level, rv->region()->max_source_level());
}
void
@@ -2494,7 +2495,11 @@ RouteTimeAxisView::join_regions ()
}
Playlist::RegionList selected_regions;
+ uint32_t max_level = 0;
- _view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions));
- track()->playlist()->join (selected_regions, "foshizzle");
+ _view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions, &max_level));
+
+ uint32_t num_joined_regions = track()->playlist()->count_joined_regions();
+ string name = string_compose (_("%1 combine-%2 (%3)"), track()->playlist()->name(), num_joined_regions+1, max_level+1);
+ track()->playlist()->join (selected_regions, name);
}