change name of a Session method to makes its intended function clear
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 2 Jun 2016 15:47:19 +0000 (11:47 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 2 Jun 2016 18:46:35 +0000 (14:46 -0400)
libs/ardour/ardour/session.h
libs/ardour/session.cc

index 341c49232f3fe64e88bcfbf8a0cb80a071d21a90..aba7a904f18509b6089dab126f365193843c8465 100644 (file)
@@ -1977,7 +1977,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        */
        GraphEdges _current_route_graph;
 
-       void ensure_presentation_info_gap (PresentationInfo::order_t, uint32_t gap_size);
+       void ensure_route_presentation_info_gap (PresentationInfo::order_t, uint32_t gap_size);
        bool ignore_route_processor_changes;
 
        MidiClockTicker* midi_clock;
index d8e19b9c1d50345cb72e8554d4655205c49ad26c..37fd3826699402ade3f6982b8f204370edd55fa1 100644 (file)
@@ -2924,15 +2924,18 @@ Session::reconnect_mmc_ports(bool inputs)
 #endif
 
 void
-Session::ensure_presentation_info_gap (PresentationInfo::order_t first_new_order, uint32_t how_many)
+Session::ensure_route_presentation_info_gap (PresentationInfo::order_t first_new_order, uint32_t how_many)
 {
        if (first_new_order == PresentationInfo::max_order) {
                /* adding at end, no worries */
                return;
        }
 
-       /* create a gap in the existing route order keys to accomodate new routes.*/
+       /* create a gap in the presentation info to accomodate @param how_many
+        * new objects.
+        */
        boost::shared_ptr <RouteList> rd = routes.reader();
+
        for (RouteList::iterator ri = rd->begin(); ri != rd->end(); ++ri) {
                boost::shared_ptr<Route> rt (*ri);
 
@@ -3074,8 +3077,6 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
 
        bool const use_number = (how_many != 1) || name_template.empty () || name_template == _("Bus");
 
-       ensure_presentation_info_gap (order, how_many);
-
        while (how_many) {
                if (!find_route_name (name_template.empty () ? _("Bus") : name_template, ++bus_id, bus_name, use_number)) {
                        error << "cannot find name for new audio bus" << endmsg;
@@ -3394,7 +3395,7 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
        }
 
        DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("ensure order gap starting at %1 for %2\n", order, new_routes.size()));
-       ensure_presentation_info_gap (order, new_routes.size());
+       ensure_route_presentation_info_gap (order, new_routes.size());
 
        for (RouteList::iterator x = new_routes.begin(); x != new_routes.end(); ++x, ++added) {