diff options
author | nick_m <mainsbridge@gmail.com> | 2015-06-18 10:03:18 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-06-18 10:03:18 +1000 |
commit | 6ecbeed8e82f594bf354d4f3974f601829b55002 (patch) | |
tree | 652b43e583c8b43ef95bb68bbfa575b421cc82c0 /libs/evoral | |
parent | 16109ebcc86ecb891986b745ee79f47fbaa570f9 (diff) |
Fix ControlList::editor_add () wrt guard points.
Diffstat (limited to 'libs/evoral')
-rw-r--r-- | libs/evoral/src/ControlList.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp index d592be3491..5118744c05 100644 --- a/libs/evoral/src/ControlList.cpp +++ b/libs/evoral/src/ControlList.cpp @@ -469,13 +469,18 @@ ControlList::editor_add (double when, double value, bool with_guard) } } + insert_position = when; + if (with_guard) { + if (when > 64) { + add_guard_point (when - 64); + } + maybe_add_insert_guard (when); + } + ControlEvent cp (when, 0.0f); iterator i = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); DEBUG_TRACE (DEBUG::ControlList, string_compose ("editor_add: actually add when= %1 value= %2\n", when, value)); _events.insert (i, new ControlEvent (when, value)); - if (with_guard) { - add_guard_point (when); - } mark_dirty (); |