diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-07 20:33:41 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-07 20:33:41 +0000 |
commit | 660fd702af13ace2d0399e47d5e9a644a6e3a8d7 (patch) | |
tree | 3b3204fa23c82b246485e70d3e77001427edb6e7 /gtk2_ardour/port_group.cc | |
parent | 040869db5c5681ee1b89fb1893fbb076d5216d42 (diff) |
Various tweaks to the bundle manager.
git-svn-id: svn://localhost/ardour2/branches/3.0@6030 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_group.cc')
-rw-r--r-- | gtk2_ardour/port_group.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index 1537ea88ee..240e03eb0f 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -184,7 +184,7 @@ PortGroup::io_from_bundle (boost::shared_ptr<ARDOUR::Bundle> b) const /** PortGroupList constructor. */ PortGroupList::PortGroupList () - : _type (DataType::AUDIO), _signals_suspended (false), _pending_change (false) + : _type (DataType::AUDIO), _signals_suspended (false), _pending_change (false), _pending_bundle_change ((Bundle::Change) 0) { } @@ -281,17 +281,12 @@ PortGroupList::gather (ARDOUR::Session& session, bool inputs) } } - /* Bundles owned by the session. We only add the mono ones and the User ones - otherwise there is duplication of the same ports within the matrix */ + /* Bundles owned by the session */ boost::shared_ptr<BundleList> b = session.bundles (); for (BundleList::iterator i = b->begin(); i != b->end(); ++i) { if ((*i)->ports_are_inputs() == inputs && (*i)->type() == _type) { - - if ((*i)->nchannels() == 1 || boost::dynamic_pointer_cast<UserBundle> (*i)) { - system->add_bundle (*i); - } - + system->add_bundle (*i); } } @@ -474,7 +469,7 @@ PortGroupList::add_group (boost::shared_ptr<PortGroup> g) g->Changed.connect (sigc::mem_fun (*this, &PortGroupList::emit_changed)); _bundle_changed_connections.push_back ( - g->BundleChanged.connect (sigc::hide (sigc::mem_fun (*this, &PortGroupList::emit_changed))) + g->BundleChanged.connect (sigc::mem_fun (*this, &PortGroupList::emit_bundle_changed)) ); emit_changed (); @@ -501,6 +496,15 @@ PortGroupList::emit_changed () } void +PortGroupList::emit_bundle_changed (Bundle::Change c) +{ + if (_signals_suspended) { + _pending_bundle_change = c; + } else { + BundleChanged (c); + } +} +void PortGroupList::suspend_signals () { _signals_suspended = true; @@ -514,6 +518,11 @@ PortGroupList::resume_signals () _pending_change = false; } + if (_pending_bundle_change != 0) { + BundleChanged (_pending_bundle_change); + _pending_bundle_change = (ARDOUR::Bundle::Change) 0; + } + _signals_suspended = false; } |