/* no regions, just a single line for the entire track (e.g. bus gain) */
} else {
+ static const Evoral::IdentityConverter<double,nframes_t> null_converter;
boost::shared_ptr<AutomationLine> line(new AutomationLine (
ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter()),
*this,
*_canvas_display,
- _control->alist()));
+ _control->alist(),
+ null_converter));
line->set_line_color (ARDOUR_UI::config()->canvasvar_ProcessorAutomationLine.get());
line->queue_reset ();
/* map using line */
- _line->view_to_model_y (y);
+ _line->view_to_model_coord (x, y);
_session.begin_reversible_command (_("add automation event"));
XMLNode& before = _control->alist()->get_state();
if (what_we_got) {
for (AutomationList::iterator x = what_we_got->begin(); x != what_we_got->end(); ++x) {
- double foo = (*x)->value;
- line.model_to_view_y (foo);
- (*x)->value = foo;
+ double when = (*x)->when;
+ double val = (*x)->value;
+ line.model_to_view_coord (when, val);
+ (*x)->when = when;
+ (*x)->value = val;
}
}
if (what_we_got) {
for (AutomationList::iterator x = what_we_got->begin(); x != what_we_got->end(); ++x) {
- double foo = (*x)->value;
- line.model_to_view_y (foo);
- (*x)->value = foo;
+ double when = (*x)->when;
+ double val = (*x)->value;
+ line.model_to_view_coord (when, val);
+ (*x)->when = when;
+ (*x)->value = val;
}
}
AutomationList copy (**p);
for (AutomationList::iterator x = copy.begin(); x != copy.end(); ++x) {
- double foo = (*x)->value;
- line.view_to_model_y (foo);
- (*x)->value = foo;
+ double when = (*x)->when;
+ double val = (*x)->value;
+ line.view_to_model_coord (when, val);
+ (*x)->when = when;
+ (*x)->value = val;
}
XMLNode &before = alist->get_state();