Fix disassociate all to only disassociate if required.

git-svn-id: svn://localhost/ardour2/branches/3.0@4512 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-02-10 00:49:48 +00:00
parent dc78d4c241
commit 81cbf022ae
1 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}
}