From 0c035778e162bd5934fc0070e43a26ffb4c8825a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 5 May 2017 12:31:21 +0100 Subject: libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls --- libs/ardour/automatable.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libs/ardour/automatable.cc') diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 7ad930f60b..00dcdec8f0 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -508,6 +508,21 @@ Automatable::control_factory(const Evoral::Parameter& param) return boost::shared_ptr(control); } +boost::shared_ptr +Automatable::automation_control (PBD::ID const & id) const +{ + Controls::const_iterator li; + + for (li = _controls.begin(); li != _controls.end(); ++li) { + boost::shared_ptr ac = boost::dynamic_pointer_cast (li->second); + if (ac && (ac->id() == id)) { + return ac; + } + } + + return boost::shared_ptr(); +} + boost::shared_ptr Automatable::automation_control (const Evoral::Parameter& id, bool create) { -- cgit v1.2.3