diff options
author | Carl Hetherington <carl@carlh.net> | 2009-02-09 03:18:10 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-02-09 03:18:10 +0000 |
commit | ee42a6dd97045253d1a9bb32fc2e571d235f9967 (patch) | |
tree | 1d4994d28477b659474075fdf82f7dbc9069bf7d /gtk2_ardour/global_port_matrix.cc | |
parent | 91032b311ee44d7bcca65feb06aca077cc3671b5 (diff) |
Fixes to bundle manager to make it vaguely usable.
Rework signal handling for bundles so that all changes should now be noticed by port matrices.
git-svn-id: svn://localhost/ardour2/branches/3.0@4501 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/global_port_matrix.cc')
-rw-r--r-- | gtk2_ardour/global_port_matrix.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc index 4cd6a78aea..24ff101c61 100644 --- a/gtk2_ardour/global_port_matrix.cc +++ b/gtk2_ardour/global_port_matrix.cc @@ -27,16 +27,15 @@ GlobalPortMatrix::GlobalPortMatrix (ARDOUR::Session& s, ARDOUR::DataType t) : PortMatrix (s, t) { - setup (); + setup_all_ports (); } void -GlobalPortMatrix::setup () +GlobalPortMatrix::setup_ports (int dim) { - _ports[IN].gather (_session, true); - _ports[OUT].gather (_session, false); - - PortMatrix::setup (); + _ports[dim].suspend_signals (); + _ports[dim].gather (_session, dim == IN); + _ports[dim].resume_signals (); } void @@ -70,12 +69,14 @@ GlobalPortMatrix::set_state (ARDOUR::BundleChannel c[2], bool s) } } - PortMatrix::State 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; + } 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) { |