Stop bundles disappearing from the port matrix when they

have no channels (#4209).  Also fix the remove all
channels menu option.


git-svn-id: svn://localhost/ardour2/branches/3.0@9986 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-08-13 20:19:39 +00:00
parent f75bbfd8ac
commit 07a58ffd62
10 changed files with 99 additions and 76 deletions

View file

@ -90,6 +90,10 @@ GlobalPortMatrix::get_state (BundleChannel c[2]) const
return PortMatrixNode::NOT_ASSOCIATED;
}
if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
return PortMatrixNode::NOT_ASSOCIATED;
}
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
if (in_ports.empty() || out_ports.empty()) {