From e6b12bd0aae9e949e8361417be26a124b30971d0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 24 Apr 2020 11:50:43 -0600 Subject: ensure that when a Session emits Port::PortDrop, transport master ports are left in place --- libs/ardour/ardour/port.h | 1 + libs/ardour/port.cc | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 781c970e2a..bb830b4247 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -185,6 +185,7 @@ private: void port_connected_or_disconnected (boost::weak_ptr, boost::weak_ptr, bool); void signal_drop (); + void session_global_drop (); void drop (); PBD::ScopedConnectionList drop_connection; PBD::ScopedConnection engine_connection; diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index d22e23c2c7..c4fb6b7862 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -83,7 +83,7 @@ Port::Port (std::string const & n, DataType t, PortFlags f) } DEBUG_TRACE (DEBUG::Ports, string_compose ("registed port %1 handle %2\n", name(), _port_handle)); - PortDrop.connect_same_thread (drop_connection, boost::bind (&Port::drop, this)); + PortDrop.connect_same_thread (drop_connection, boost::bind (&Port::session_global_drop, this)); PortSignalDrop.connect_same_thread (drop_connection, boost::bind (&Port::signal_drop, this)); port_manager->PortConnectedOrDisconnected.connect_same_thread (engine_connection, boost::bind (&Port::port_connected_or_disconnected, this, _1, _3, _5)); } @@ -127,6 +127,16 @@ Port::set_pretty_name(const std::string& n) return false; } +void +Port::session_global_drop() +{ + if (_flags & TransportMasterPort) { + return; + } + + drop (); +} + void Port::signal_drop () { -- cgit v1.2.3