From 02a18400fa25c8a48bcc9c831bcbc98de2c4807f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 3 Jul 2016 13:22:47 -0400 Subject: [PATCH] fix behaviour when opening up a gap to insert new Stripables. Need to include all stripables, not just routes, and need to include master since editor (and maybe others) opt to use the presentation_info().order() value for it --- libs/ardour/session.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 8ec63f5714..2218ef5810 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2938,17 +2938,18 @@ Session::ensure_route_presentation_info_gap (PresentationInfo::order_t first_new /* create a gap in the presentation info to accomodate @param how_many * new objects. */ - boost::shared_ptr rd = routes.reader(); + StripableList sl; + get_stripables (sl); - for (RouteList::iterator ri = rd->begin(); ri != rd->end(); ++ri) { - boost::shared_ptr rt (*ri); + for (StripableList::iterator si = sl.begin(); si != sl.end(); ++si) { + boost::shared_ptr s (*si); - if (rt->presentation_info().special()) { + if (s->is_monitor() || s->is_auditioner()) { continue; } - if (rt->presentation_info().order () >= first_new_order) { - rt->set_presentation_order (rt->presentation_info().order () + how_many); + if (s->presentation_info().order () >= first_new_order) { + s->set_presentation_order (s->presentation_info().order () + how_many); } } }