diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-13 20:19:39 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-13 20:19:39 +0000 |
commit | 07a58ffd62f834780eb5dada7c1713e31c2e425a (patch) | |
tree | 64b6bcd0ea1f9249af3a6656770764bc4933d726 /gtk2_ardour/global_port_matrix.cc | |
parent | f75bbfd8ac52ea33692c3ee15953ceb2994117ab (diff) |
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
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r-- | gtk2_ardour/global_port_matrix.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc index df22424520..565def896e 100644 --- a/gtk2_ardour/global_port_matrix.cc +++ b/gtk2_ardour/global_port_matrix.cc @@ -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()) { |