/* great. we already have an AutomationRegionView for this Region. use it again. */
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*>(*i);;
- if (arv->line())
+ if (arv->line()) {
arv->line()->set_list (list);
+ }
(*i)->set_valid (true);
(*i)->enable_display(wfd);
display_region(arv);
if (line && line->the_list()) {
line->the_list()->set_automation_state (automation_state ());
}
-
+
RegionViewAdded (region_view);
return region_view;
AutomationStreamView::set_automation_state (AutoState state)
{
/* Setting the automation state for this view sets the state of all regions' lists to the same thing */
-
+
if (region_views.empty()) {
_pending_automation_state = state;
} else {
AutomationStreamView::has_automation () const
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
-
+
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
if ((*i)->npoints() > 0) {
return true;
AutomationStreamView::set_interpolation (AutomationList::InterpolationStyle s)
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
-
+
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
(*i)->the_list()->set_interpolation (s);
}
AutomationStreamView::clear ()
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
-
+
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
(*i)->clear ();
}
AutomationStreamView::set_selected_points (PointSelection& ps)
{
list<boost::shared_ptr<AutomationLine> > lines = get_lines ();
-
+
for (list<boost::shared_ptr<AutomationLine> >::iterator i = lines.begin(); i != lines.end(); ++i) {
(*i)->set_selected_points (ps);
}
AutomationStreamView::get_lines () const
{
list<boost::shared_ptr<AutomationLine> > lines;
-
+
for (list<RegionView*>::const_iterator i = region_views.begin(); i != region_views.end(); ++i) {
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
assert (arv);
return a->region()->position() < b->region()->position();
}
};
-
+
/** @param pos Position, in session frames.
* @return AutomationLine to paste to for that position, or 0 if there is none appropriate.