diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index 8c0003310a..29eac5ea3b 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -346,6 +346,7 @@ class LIBARDOUR_API TriggerBox : public Processor int set_state (const XMLNode&, int version); int set_from_path (uint64_t slot, std::string const & path); + int set_from_selection (uint64_t slot, boost::shared_ptr); DataType data_type() const { return _data_type; } diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 080a1d1bb4..684d769b88 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -1285,6 +1285,16 @@ TriggerBox::get_next_trigger () return 0; } +int +TriggerBox::set_from_selection (uint64_t slot, boost::shared_ptr region) +{ + if (slot >= all_triggers.size()) { + return 0; + } + + return all_triggers[slot]->set_region (region); +} + int TriggerBox::set_from_path (uint64_t slot, std::string const & path) {