summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-02-24 17:10:17 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-02-24 17:10:17 +0000
commit0c5c1aafd06f24442f31f87de1fd1f51d6ce9291 (patch)
treef28af11865a2663ed9a5249184a83fdaa9d4242b /gtk2_ardour/port_matrix.cc
parente1905c1c29df0911adfeb9acfea2aa1e077ca892 (diff)
don't show remove port options for individual ports if there is only one (port matrix)
git-svn-id: svn://localhost/ardour2/branches/3.0@8951 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 5b747d6693..696c625da0 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -455,11 +455,13 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::remove_all_channels), w))
);
- for (uint32_t i = 0; i < bc[dim].bundle->nchannels().n_total(); ++i) {
- if (should_show (bc[dim].bundle->channel_type(i))) {
- add_remove_option (sub, w, i);
- }
- }
+ if (bc[dim].bundle->nchannels().n_total() > 1) {
+ for (uint32_t i = 0; i < bc[dim].bundle->nchannels().n_total(); ++i) {
+ if (should_show (bc[dim].bundle->channel_type(i))) {
+ add_remove_option (sub, w, i);
+ }
+ }
+ }
}
}