From 0c5c1aafd06f24442f31f87de1fd1f51d6ce9291 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 24 Feb 2011 17:10:17 +0000 Subject: 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 --- gtk2_ardour/port_matrix.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/port_matrix.cc') 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); + } + } + } } } -- cgit v1.2.3