summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_row_labels.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-11-10 03:16:57 +0000
committerCarl Hetherington <carl@carlh.net>2009-11-10 03:16:57 +0000
commitdbb0b9ca4f82ea8e3829cfeb009b9746c3d6f0dc (patch)
tree2419b9eb122cf19a28940ea115c2d9630d0a22cc /gtk2_ardour/port_matrix_row_labels.cc
parentda03bc931b4c82497fb4b02003804c18768c56b6 (diff)
Various adjustments to user bundle handling, with the general aim of allowing the user to create meaningful bundles with respect to their sound card an outboard setup, and having those user bundles take priority over ardour-generated ones.
git-svn-id: svn://localhost/ardour2/branches/3.0@6050 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_row_labels.cc')
-rw-r--r--gtk2_ardour/port_matrix_row_labels.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/gtk2_ardour/port_matrix_row_labels.cc b/gtk2_ardour/port_matrix_row_labels.cc
index 47c791afb3..21efda897e 100644
--- a/gtk2_ardour/port_matrix_row_labels.cc
+++ b/gtk2_ardour/port_matrix_row_labels.cc
@@ -291,13 +291,6 @@ PortMatrixRowLabels::render_bundle_name (
double const off = grid_spacing() / 2;
-// if ((*i)->nchannels () > 0 && !_matrix->show_only_bundles()) {
-// /* use the extent of our first channel name so that the bundle name is vertically aligned with it */
-// cairo_text_extents_t ext;
-// cairo_text_extents (cr, (*i)->channel_name(0).c_str(), &ext);
-// off = (grid_spacing() - ext.height) / 2;
-// }
-
set_source_rgb (cr, text_colour());
cairo_move_to (cr, xoff + x + name_pad(), yoff + name_pad() + off);
cairo_show_text (cr, b->name().c_str());
@@ -319,9 +312,15 @@ PortMatrixRowLabels::render_channel_name (
cairo_text_extents (cr, bc.bundle->channel_name(bc.channel).c_str(), &ext);
double const off = (grid_spacing() - ext.height) / 2;
- set_source_rgb (cr, text_colour());
- cairo_move_to (cr, port_name_x() + xoff + name_pad(), yoff + name_pad() + off);
- cairo_show_text (cr, bc.bundle->channel_name(bc.channel).c_str());
+ if (bc.bundle->nchannels() > 1) {
+
+ /* only plot the name if the bundle has more than one channel;
+ the name of a single channel is assumed to be redundant */
+
+ set_source_rgb (cr, text_colour());
+ cairo_move_to (cr, port_name_x() + xoff + name_pad(), yoff + name_pad() + off);
+ cairo_show_text (cr, bc.bundle->channel_name(bc.channel).c_str());
+ }
}
double