diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index 2ba66ab39a..46402650ba 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -79,7 +79,7 @@ private: void send_from_going_away (); void send_to_going_away (); void send_to_property_changed (const PBD::PropertyChange&); - int connect_when_legal (); + int after_connect (); void init_gain (); int use_target (boost::shared_ptr, bool update_name = true); void target_io_changed (); diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 6ae57d10cd..7676192a1e 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -421,12 +421,13 @@ InternalSend::set_state (const XMLNode& node, int version) * exist. */ - if (!IO::connecting_legal) { - IO::ConnectingLegal.connect_same_thread (connect_c, boost::bind (&InternalSend::connect_when_legal, this)); + if (_session.loading()) { + Session::AfterConnect.connect_same_thread (connect_c, boost::bind (&InternalSend::after_connect, this)); } else { - connect_when_legal (); + after_connect (); } } + allow_pan_reset (); if (!is_foldback ()) { @@ -439,7 +440,7 @@ InternalSend::set_state (const XMLNode& node, int version) } int -InternalSend::connect_when_legal () +InternalSend::after_connect () { connect_c.disconnect ();