summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_grid.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-01 01:14:14 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-01 01:14:14 +0000
commit92e412661772e6b9c83109b7ee4996f4c040d3f4 (patch)
tree1f1006c61d03b6b68855d812561d931606ff84b3 /gtk2_ardour/port_matrix_grid.cc
parentaad230da6937358b11976c1db3986575b2e412a0 (diff)
Allow port matrix to show both audio and midi ports at the same time, and use that facility for route IO selectors.
git-svn-id: svn://localhost/ardour2/branches/3.0@7344 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r--gtk2_ardour/port_matrix_grid.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc
index 572b278f79..f4ca28fcd2 100644
--- a/gtk2_ardour/port_matrix_grid.cc
+++ b/gtk2_ardour/port_matrix_grid.cc
@@ -81,7 +81,7 @@ PortMatrixGrid::render (cairo_t* cr)
if (!_matrix->show_only_bundles()) {
cairo_set_line_width (cr, thin_grid_line_width());
- for (uint32_t j = 0; j < (*i)->bundle->nchannels().get(_matrix->type()); ++j) {
+ for (uint32_t j = 0; j < _matrix->count_of_our_type ((*i)->bundle->nchannels()); ++j) {
x += grid_spacing ();
cairo_move_to (cr, x, 0);
cairo_line_to (cr, x, _height);
@@ -111,7 +111,7 @@ PortMatrixGrid::render (cairo_t* cr)
if (!_matrix->show_only_bundles()) {
cairo_set_line_width (cr, thin_grid_line_width());
- for (uint32_t j = 0; j < (*i)->bundle->nchannels().get(_matrix->type()); ++j) {
+ for (uint32_t j = 0; j < _matrix->count_of_our_type ((*i)->bundle->nchannels()); ++j) {
y += grid_spacing ();
cairo_move_to (cr, 0, y);
cairo_line_to (cr, _width, y);
@@ -174,7 +174,7 @@ PortMatrixGrid::render (cairo_t* cr)
y = by;
for (uint32_t l = 0; l < (*j)->bundle->nchannels().n_total(); ++l) {
- if ((*i)->bundle->channel_type(k) != _matrix->type() || (*j)->bundle->channel_type(l) != _matrix->type()) {
+ if (!_matrix->should_show ((*i)->bundle->channel_type(k)) || !_matrix->should_show ((*j)->bundle->channel_type(l))) {
continue;
}
@@ -202,10 +202,10 @@ PortMatrixGrid::render (cairo_t* cr)
x += grid_spacing();
}
- by += (*j)->bundle->nchannels().get(_matrix->type()) * grid_spacing();
+ by += _matrix->count_of_our_type ((*j)->bundle->nchannels()) * grid_spacing();
}
- bx += (*i)->bundle->nchannels().get(_matrix->type()) * grid_spacing();
+ bx += _matrix->count_of_our_type ((*i)->bundle->nchannels()) * grid_spacing();
}
}
}
@@ -285,7 +285,7 @@ PortMatrixGrid::get_association (PortMatrixNode node) const
for (uint32_t j = 0; j < node.column.bundle->nchannels().n_total(); ++j) {
- if (node.row.bundle->channel_type(i) != _matrix->type() || node.column.bundle->channel_type(j) != _matrix->type()) {
+ if (!_matrix->should_show (node.row.bundle->channel_type(i)) || !_matrix->should_show (node.column.bundle->channel_type(j))) {
continue;
}
@@ -345,7 +345,7 @@ PortMatrixGrid::set_association (PortMatrixNode node, bool s)
for (uint32_t i = 0; i < node.column.bundle->nchannels().n_total(); ++i) {
for (uint32_t j = 0; j < node.row.bundle->nchannels().n_total(); ++j) {
- if (node.column.bundle->channel_type(i) != _matrix->type() || node.row.bundle->channel_type(j) != _matrix->type()) {
+ if (!_matrix->should_show (node.column.bundle->channel_type(i)) || !_matrix->should_show (node.row.bundle->channel_type(j))) {
continue;
}