Fix ATAV identification by Parameter (2/2) #8201, 8203

Allow to uniquely identify Processor ATAV using the control ID.
This commit is contained in:
Robin Gareus 2020-06-04 21:11:06 +02:00
parent 0ab13e7b29
commit 54ffd92fde
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 28 additions and 11 deletions

View file

@ -2749,6 +2749,23 @@ RouteTimeAxisView::remove_child (boost::shared_ptr<TimeAxisView> c)
}
}
boost::shared_ptr<AutomationTimeAxisView>
RouteTimeAxisView::automation_child(Evoral::Parameter param, PBD::ID ctrl_id)
{
if (param.type() != PluginAutomation) {
return StripableTimeAxisView::automation_child (param, ctrl_id);
}
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<ProcessorAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
boost::shared_ptr<AutomationTimeAxisView> atv ((*ii)->view);
if (atv->control()->id() == ctrl_id) {
return atv;
}
}
}
return boost::shared_ptr<AutomationTimeAxisView>();
}
boost::shared_ptr<AutomationLine>
RouteTimeAxisView::automation_child_by_alist_id (PBD::ID alist_id)
{