diff options
author | Carl Hetherington <carl@carlh.net> | 2011-09-06 23:28:55 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-09-06 23:28:55 +0000 |
commit | 174c0d6831573f24689b7f1f6d6256583f790da6 (patch) | |
tree | 8c2efe92193e22ca04c6c2678d21dd411055fe71 /gtk2_ardour/automation_region_view.cc | |
parent | 853904aa2637babfa64bdd22d2343965c2d010de (diff) |
Snap new automation points in AutomationRegionViews (#4297).
git-svn-id: svn://localhost/ardour2/branches/3.0@10059 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r-- | gtk2_ardour/automation_region_view.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index cd734ac791..161b6a88d6 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -147,6 +147,10 @@ AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double const double h = trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2; y = 1.0 - (y / h); + /* snap frame */ + + when = snap_frame_to_frame (when - _region->start ()); + /* map using line */ double when_d = when; |