when removing routes, don't do potentially expensive work once for each route.
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 10 Sep 2015 15:35:25 +0000 (11:35 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 10 Sep 2015 15:35:57 +0000 (11:35 -0400)
We can update solo state and tell interested parties about the removal once the actual removal is done

libs/ardour/session.cc

index 94a12ca50434ec51fc4d072ffcdb840a5fc9053f..c3eca166df072c708b9f9c1156a81f1f731d4533 100644 (file)
@@ -3376,8 +3376,6 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
                                _monitor_out.reset ();
                        }
 
-                       update_route_solo_state ();
-            
                        // We need to disconnect the route's inputs and outputs
             
                        (*iter)->input()->disconnect (0);
@@ -3408,14 +3406,14 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
                                        _step_editors--;
                                }
                        }
-
-                       RouteAddedOrRemoved (false); /* EMIT SIGNAL */
                }
     
                /* writer goes out of scope, forces route list update */
 
        } // end of RCU Writer scope
     
+       update_route_solo_state ();
+       RouteAddedOrRemoved (false); /* EMIT SIGNAL */
        update_latency_compensation ();
        set_dirty();