From 81cbf022ae5ce081fd752a9111118a4ca276ec5a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 10 Feb 2009 00:49:48 +0000 Subject: [PATCH] Fix disassociate all to only disassociate if required. git-svn-id: svn://localhost/ardour2/branches/3.0@4512 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_matrix.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index 2ca3c7cd76..4fde95b827 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -282,7 +282,7 @@ PortMatrix::disassociate_all () { ARDOUR::BundleList a = _ports[0].bundles (); ARDOUR::BundleList b = _ports[1].bundles (); - + for (ARDOUR::BundleList::iterator i = a.begin(); i != a.end(); ++i) { for (uint32_t j = 0; j < (*i)->nchannels(); ++j) { for (ARDOUR::BundleList::iterator k = b.begin(); k != b.end(); ++k) { @@ -292,8 +292,10 @@ PortMatrix::disassociate_all () ARDOUR::BundleChannel (*i, j), ARDOUR::BundleChannel (*k, l) }; - - set_state (c, false); + + if (get_state (c) == ASSOCIATED) { + set_state (c, false); + } } }