mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 15:37:48 +01:00
[Summary] Optimized Tracks removing/adding but redundant actions cut off
This commit is contained in:
parent
fc6429cad4
commit
e09e36afde
2 changed files with 10 additions and 1 deletions
|
|
@ -184,6 +184,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
|||
void clear_deletion_in_progress ();
|
||||
bool deletion_in_progress() const { return _state_of_the_state & Deletion; }
|
||||
bool reconnection_in_progress() const { return _reconnecting_routes_in_progress; }
|
||||
bool routes_deletion_in_progress() const { return _route_deletion_in_progress; }
|
||||
PBD::Signal0<void> DirtyChanged;
|
||||
|
||||
const SessionDirectory& session_directory () const { return *(_session_dir.get()); }
|
||||
|
|
@ -1384,6 +1385,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
|||
void add_routes_inner (RouteList&, bool input_auto_connect, bool output_auto_connect);
|
||||
bool _adding_routes_in_progress;
|
||||
bool _reconnecting_routes_in_progress;
|
||||
bool _route_deletion_in_progress;
|
||||
|
||||
uint32_t destructive_index;
|
||||
|
||||
|
|
|
|||
|
|
@ -2294,6 +2294,11 @@ Session::auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing
|
|||
void
|
||||
Session::reconnect_existing_routes (bool withLock, bool reconnect_master, bool reconnect_inputs, bool reconnect_outputs)
|
||||
{
|
||||
// if we are deleting routes we will call this once at the end
|
||||
if (_route_deletion_in_progress) {
|
||||
return;
|
||||
}
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock (), Glib::Threads::NOT_LOCK);
|
||||
|
||||
if (withLock) {
|
||||
|
|
@ -2947,7 +2952,8 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
|
|||
}
|
||||
|
||||
if (input_auto_connect || output_auto_connect) {
|
||||
auto_connect_route (r, existing_inputs, existing_outputs, true, input_auto_connect);
|
||||
// routes will be connected later
|
||||
//auto_connect_route (r, existing_inputs, existing_outputs, true, input_auto_connect);
|
||||
}
|
||||
|
||||
/* order keys are a GUI responsibility but we need to set up
|
||||
|
|
@ -3169,6 +3175,7 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
|
|||
/* try to cause everyone to drop their references
|
||||
* and unregister ports from the backend
|
||||
*/
|
||||
PBD::Unwinder<bool> uw_flag (_route_deletion_in_progress, true);
|
||||
for (RouteList::iterator iter = routes_to_remove->begin(); iter != routes_to_remove->end(); ++iter) {
|
||||
|
||||
(*iter)->drop_references ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue