_controller = AutomationController::create (_automatable, _control->parameter(), _control->desc(), _control);
}
+ const std::string fill_color_name = (dynamic_cast<MidiTimeAxisView*>(&parent)
+ ? "midi automation track fill"
+ : "audio automation track fill");
+
automation_menu = 0;
auto_off_item = 0;
auto_touch_item = 0;
CANVAS_DEBUG_NAME (_base_rect, string_compose ("base rect for %1", _name));
_base_rect->set_x1 (ArdourCanvas::COORD_MAX);
_base_rect->set_outline (false);
- _base_rect->set_fill_color (ARDOUR_UI::config()->color ("automation track fill"));
+ _base_rect->set_fill_color (ARDOUR_UI::config()->color_mod (fill_color_name, "automation track fill"));
_base_rect->set_data ("trackview", this);
_base_rect->Event.connect (sigc::bind (sigc::mem_fun (_editor, &PublicEditor::canvas_automation_track_event), _base_rect, this));
if (!a) {
{
assert (_line || _view);
- _session->begin_reversible_command (_("clear automation"));
+ _editor.begin_reversible_command (_("clear automation"));
if (_line) {
_line->clear ();
_view->clear ();
}
- _session->commit_reversible_command ();
+ _editor.commit_reversible_command ();
_session->set_dirty ();
}
_editor.snap_to_with_modifier (when, event);
- _session->begin_reversible_command (_("add automation event"));
+ _editor.begin_reversible_command (_("add automation event"));
XMLNode& before = list->get_state();
list->add (when, y, with_guard_points);
XMLNode& after = list->get_state();
- _session->commit_reversible_command (new MementoCommand<ARDOUR::AutomationList> (*list, &before, &after));
+ _session->add_command (new MementoCommand<ARDOUR::AutomationList> (*list, &before, &after));
+ _editor.commit_reversible_command ();
_session->set_dirty ();
}
}
void
-AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results)
+AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results, bool /*within*/)
{
if (!_line && !_view) {
return;