summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_group.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-11-15 00:26:28 +0000
committerCarl Hetherington <carl@carlh.net>2009-11-15 00:26:28 +0000
commit2e02e157c30464ccc1cd9d8dc7564d2fabc95e5e (patch)
treed1cbf7ee53f73314a5481747b976a5a70cbfac28 /gtk2_ardour/port_group.cc
parentccf58b8de23619db9983a45f696fd97e13a15cce (diff)
Tidy up a bit in the case where the port matrix has nothing to display.
git-svn-id: svn://localhost/ardour2/branches/3.0@6089 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_group.cc')
-rw-r--r--gtk2_ardour/port_group.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index 8d10be23c8..938e82af0b 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -565,6 +565,17 @@ PortGroupList::io_from_bundle (boost::shared_ptr<ARDOUR::Bundle> b) const
return boost::shared_ptr<IO> ();
}
+bool
+PortGroupList::empty () const
+{
+ List::const_iterator i = _groups.begin ();
+ while (i != _groups.end() && (*i)->total_channels() == 0) {
+ ++i;
+ }
+
+ return (i == _groups.end());
+}
+
RouteBundle::RouteBundle (boost::shared_ptr<Bundle> r)
: _route (r)