summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-05-25 12:19:24 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-05-25 12:19:24 +0000
commite984220eaaa318d9b51ebb20995d1bccae389389 (patch)
tree9e1eb88a532f642c2f5682817198ea0ae6414cb9 /gtk2_ardour
parent49785b8fbb3f21080c75bb1162f387db914faae2 (diff)
correct the logic used when building a compound region to include a whole-file (whole-source) region as a parent for the region list
git-svn-id: svn://localhost/ardour2/branches/3.0@9584 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/route_time_axis.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index bbdc369ede..f1e00978e9 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -2480,10 +2480,9 @@ RouteTimeAxisView::create_gain_automation_child (const Evoral::Parameter& param,
}
static
-void add_region_to_list (RegionView* rv, Playlist::RegionList* l, uint32_t* max_level)
+void add_region_to_list (RegionView* rv, Playlist::RegionList* l)
{
l->push_back (rv->region());
- *max_level = max (*max_level, rv->region()->max_source_level());
}
RegionView*
@@ -2497,14 +2496,11 @@ RouteTimeAxisView::combine_regions ()
Playlist::RegionList selected_regions;
boost::shared_ptr<Playlist> playlist = track()->playlist();
- uint32_t max_level = 0;
- _view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions, &max_level));
+ _view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions));
- string name = RegionFactory::compound_region_name (playlist->name(), playlist->combine_ops(), max_level);
-
playlist->clear_changes ();
- boost::shared_ptr<Region> compound_region = playlist->combine (selected_regions, name);
+ boost::shared_ptr<Region> compound_region = playlist->combine (selected_regions);
_session->add_command (new StatefulDiffCommand (playlist));
/* make the new region be selected */
@@ -2523,13 +2519,12 @@ RouteTimeAxisView::uncombine_regions ()
Playlist::RegionList selected_regions;
boost::shared_ptr<Playlist> playlist = track()->playlist();
- uint32_t max_level = 0;
/* have to grab selected regions first because the uncombine is going
* to change that in the middle of the list traverse
*/
- _view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions, &max_level));
+ _view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions));
playlist->clear_changes ();