fix shared_ptr<Route> management in Mackie support so that deleted routes are destroyed
[ardour.git] / libs / surfaces / mackie / surface.cc
index 6941c68d29dbf93feedc292f6bfabcf6c87e9033..24e82d59b59a9126bbb86bf575bb017afbf3cd8d 100644 (file)
@@ -937,7 +937,7 @@ Surface::map_routes (const vector<boost::shared_ptr<Route> >& routes)
        vector<boost::shared_ptr<Route> >::const_iterator r;
        Strips::iterator s = strips.begin();
 
-       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mapping %1 routes\n", routes.size()));
+       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mapping %1 routes to %2 strips\n", routes.size(), strips.size()));
 
        for (r = routes.begin(); r != routes.end() && s != strips.end(); ++s) {
 
@@ -953,6 +953,7 @@ Surface::map_routes (const vector<boost::shared_ptr<Route> >& routes)
        }
 
        for (; s != strips.end(); ++s) {
+               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("strip %1 being set to null route\n", (*s)->index()));
                (*s)->set_route (boost::shared_ptr<Route>());
        }
 }