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/port_matrix_column_labels.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/port_matrix_column_labels.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_column_labels.cc | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/gtk2_ardour/port_matrix_column_labels.cc b/gtk2_ardour/port_matrix_column_labels.cc index 06a635b41d..2790c0537e 100644 --- a/gtk2_ardour/port_matrix_column_labels.cc +++ b/gtk2_ardour/port_matrix_column_labels.cc @@ -134,16 +134,12 @@ PortMatrixColumnLabels::render (cairo_t* cr) int g = 0; for (PortGroupList::List::const_iterator i = _matrix->columns()->begin(); i != _matrix->columns()->end(); ++i) { - if (!(*i)->visible() || ((*i)->bundles().empty() && (*i)->ports.empty()) ) { + if (!(*i)->visible() || (*i)->bundles().empty()) { continue; } /* compute width of this group */ - uint32_t w = 0; - for (ARDOUR::BundleList::const_iterator j = (*i)->bundles().begin(); j != (*i)->bundles().end(); ++j) { - w += (*j)->nchannels() * column_width(); - } - w += (*i)->ports.size() * column_width(); + uint32_t w = (*i)->total_channels() * column_width(); /* rectangle */ set_source_rgb (cr, get_a_group_colour (g)); @@ -413,15 +409,14 @@ PortMatrixColumnLabels::queue_draw_for (ARDOUR::BundleChannel const & bc) ); } - - + } } void PortMatrixColumnLabels::button_press (double x, double y, int b, uint32_t t) { - uint32_t N = _matrix->columns()->total_visible_ports (); + uint32_t N = _matrix->columns()->total_visible_channels (); uint32_t i = 0; for (; i < N; ++i) { @@ -453,19 +448,8 @@ PortMatrixColumnLabels::button_press (double x, double y, int b, uint32_t t) _body->highlight_associated_channels (_matrix->column_index(), i); break; case 3: - maybe_popup_context_menu (i, t); + _matrix->popup_channel_context_menu (_matrix->column_index(), i, t); break; } } - -void -PortMatrixColumnLabels::maybe_popup_context_menu (int i, uint32_t t) -{ - if (!_matrix->can_rename_channels (_matrix->column_index()) && - !_matrix->can_remove_channels (_matrix->column_index())) { - return; - } - - _matrix->popup_channel_context_menu (_matrix->column_index(), i, t); -} |