}
void
-AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/, framepos_t when, double y)
+AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when, double y)
{
if (!_line) {
return;
boost::shared_ptr<AutomationList> list = _line->the_list ();
+ _editor.snap_to_with_modifier (when, event);
+
_session->begin_reversible_command (_("add automation event"));
XMLNode& before = list->get_state();
void set_samples_per_unit (double);
std::string name() const { return _name; }
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, framepos_t, double);
+ void add_automation_event (GdkEvent *, framepos_t, double);
void clear_lines ();
case AutomationTrackItem:
atv = dynamic_cast<AutomationTimeAxisView*>(clicked_axisview);
if (atv) {
- atv->add_automation_event (item, event, where, event->button.y);
+ atv->add_automation_event (event, where, event->button.y);
}
return true;
break;
case AutomationTrackItem:
dynamic_cast<AutomationTimeAxisView*>(clicked_axisview)->
- add_automation_event (item, event, where, event->button.y);
+ add_automation_event (event, where, event->button.y);
return true;
break;
default:
virtual ARDOUR::Location* find_location_from_marker (Marker *, bool &) const = 0;
virtual Marker* find_marker_from_location_id (PBD::ID const &, bool) const = 0;
+ virtual void snap_to_with_modifier (framepos_t &, GdkEvent const *, int32_t direction = 0, bool for_mark = false) = 0;
+
/// Singleton instance, set up by Editor::Editor()
static PublicEditor* _instance;