From 66760a574a1fc0ccc8a798c2900a717c134838ea Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 29 Jul 2010 19:25:26 +0000 Subject: Don't display empty tabs in the port matrix. git-svn-id: svn://localhost/ardour2/branches/3.0@7521 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/bundle.h | 2 ++ libs/ardour/bundle.cc | 13 +++++++++++++ 2 files changed, 15 insertions(+) (limited to 'libs') diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 39c58ed318..975e407646 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -51,6 +51,7 @@ class Bundle : public PBD::ScopedConnectionList struct Channel { Channel (std::string n, DataType t) : name (n), type (t) {} + Channel (std::string n, DataType t, PortList p) : name (n), type (t), ports (p) {} bool operator== (Channel const &o) const { return name == o.name && type == o.type && ports == o.ports; @@ -76,6 +77,7 @@ class Bundle : public PBD::ScopedConnectionList PortList const & channel_ports (uint32_t) const; void add_channel (std::string const &, DataType); + void add_channel (std::string const &, DataType, PortList); std::string channel_name (uint32_t) const; DataType channel_type (uint32_t) const; void set_channel_name (uint32_t, std::string const &); diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index 9878437ff8..94fada383d 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -165,6 +165,18 @@ Bundle::add_channel (std::string const & n, DataType t) emit_changed (ConfigurationChanged); } +/** @param n Channel name */ +void +Bundle::add_channel (std::string const & n, DataType t, PortList p) +{ + { + Glib::Mutex::Lock lm (_channel_mutex); + _channel.push_back (Channel (n, t, p)); + } + + emit_changed (ConfigurationChanged); +} + bool Bundle::port_attached_to_channel (uint32_t ch, std::string portname) { @@ -471,3 +483,4 @@ Bundle::channel_type (uint32_t c) const Glib::Mutex::Lock lm (_channel_mutex); return _channel[c].type; } + -- cgit v1.2.3