diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-18 16:15:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-18 16:15:11 +0000 |
commit | 2d9ed69fe2f8f35d81bb9bc33c8f4fa8393dd00a (patch) | |
tree | 82fe9f5e381c45e95962ba024bd87228a6f62047 /libs/ardour/io.cc | |
parent | 3e59452fa0182ace7785c62acef83cb0d213cc86 (diff) |
change input/output button context menus for mixer strip to be non-additive: when selecting a new IO bundle, disconnect from any existing connections before connecting to the new one (fixes #5087)
git-svn-id: svn://localhost/ardour2/branches/3.0@13308 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index d39ba7b4f9..38b5fc717d 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -912,7 +912,7 @@ IO::make_connections (const XMLNode& node, int version, bool in) if (prop) { boost::shared_ptr<Bundle> b = find_possible_bundle (prop->value()); if (b) { - connect_ports_to_bundle (b, this); + connect_ports_to_bundle (b, true, this); } } @@ -1241,13 +1241,19 @@ IO::latency () const } int -IO::connect_ports_to_bundle (boost::shared_ptr<Bundle> c, void* src) +IO::connect_ports_to_bundle (boost::shared_ptr<Bundle> c, bool exclusive, void* src) { BLOCK_PROCESS_CALLBACK (); { Glib::Threads::Mutex::Lock lm2 (io_lock); + if (exclusive) { + for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) { + i->disconnect_all (); + } + } + c->connect (_bundle, _session.engine()); /* If this is a UserBundle, make a note of what we've done */ |