/* no regions, just a single line for the entire track (e.g. bus gain) */
} else {
-
boost::shared_ptr<AutomationLine> line(new AutomationLine (
ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter()),
*this,
{
bool changed = (height != (uint32_t) h) || first_call_to_set_height;
bool changed_between_small_and_normal = (
- (height < hNormal && h >= hNormal) ||
- (height >= hNormal ||
- h < hNormal)
- );
+ (height < hNormal && h >= hNormal)
+ || (height >= hNormal || h < hNormal) );
TimeAxisView* state_parent = get_parent_with_state ();
assert(state_parent);
auto_state_menu->set_name ("ArdourContextMenu");
MenuList& as_items = auto_state_menu->items();
- as_items.push_back (CheckMenuElem (_("Manual"),
- bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
+ as_items.push_back (CheckMenuElem (_("Manual"), bind (
+ mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+ (AutoState) Off)));
auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
- as_items.push_back (CheckMenuElem (_("Play"),
- bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
+ as_items.push_back (CheckMenuElem (_("Play"), bind (
+ mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+ (AutoState) Play)));
auto_play_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
- as_items.push_back (CheckMenuElem (_("Write"),
- bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
+ as_items.push_back (CheckMenuElem (_("Write"), bind (
+ mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+ (AutoState) Write)));
auto_write_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
- as_items.push_back (CheckMenuElem (_("Touch"),
- bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
+ as_items.push_back (CheckMenuElem (_("Touch"), bind (
+ mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+ (AutoState) Touch)));
auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
items.push_back (MenuElem (_("State"), *auto_state_menu));
/* 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();
_line->track_exited();
}
-/*void
-AutomationTimeAxisView::set_colors ()
-{
- for (list<GhostRegion*>::iterator i=ghosts.begin(); i != ghosts.end(); i++ ) {
- (*i)->set_colors();
- }
-
- if (_line)
- _line->set_colors();
- }*/
-
void
AutomationTimeAxisView::color_handler ()
{