diff options
author | Carl Hetherington <carl@carlh.net> | 2009-02-14 20:17:45 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-02-14 20:17:45 +0000 |
commit | b0091c899bfc868de6a19af2f0cc74abca7fe173 (patch) | |
tree | 0ded27fd53d3e6006f602fb494deabaaf5e50dad /gtk2_ardour | |
parent | 9a3734a6bd0450faf92a8b1add2d5e052a4534ca (diff) |
If a bundle's channel has no ports associated with it, you can't connect
it to anything; mark things up accordingly in the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@4557 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/global_port_matrix.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/io_selector.cc | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc index 5f5f8d64c3..bc63237244 100644 --- a/gtk2_ardour/global_port_matrix.cc +++ b/gtk2_ardour/global_port_matrix.cc @@ -77,9 +77,11 @@ GlobalPortMatrix::get_state (ARDOUR::BundleChannel c[2]) const ARDOUR::Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel); ARDOUR::Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel); if (in_ports.empty() || out_ports.empty()) { - return NOT_ASSOCIATED; + /* we're looking at a bundle with no parts associated with this channel, + so nothing to connect */ + return UNKNOWN; } - + for (ARDOUR::Bundle::PortList::const_iterator i = in_ports.begin(); i != in_ports.end(); ++i) { for (ARDOUR::Bundle::PortList::const_iterator j = out_ports.begin(); j != out_ports.end(); ++j) { diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index e868a6ad2b..f31a2a7d3c 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -118,6 +118,12 @@ IOSelector::get_state (ARDOUR::BundleChannel c[2]) const ARDOUR::Bundle::PortList const & our_ports = c[_ours].bundle->channel_ports (c[_ours].channel); ARDOUR::Bundle::PortList const & other_ports = c[_other].bundle->channel_ports (c[_other].channel); + if (our_ports.empty() || other_ports.empty()) { + /* we're looking at a bundle with no parts associated with this channel, + so nothing to connect */ + return UNKNOWN; + } + for (ARDOUR::Bundle::PortList::const_iterator i = our_ports.begin(); i != our_ports.end(); ++i) { for (ARDOUR::Bundle::PortList::const_iterator j = other_ports.begin(); j != other_ports.end(); ++j) { |