13
0

Fix ControlList::editor_add () wrt guard points.

This commit is contained in:
nick_m 2015-06-18 10:03:18 +10:00
parent 16109ebcc8
commit 6ecbeed8e8

View File

@ -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); ControlEvent cp (when, 0.0f);
iterator i = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); 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)); DEBUG_TRACE (DEBUG::ControlList, string_compose ("editor_add: actually add when= %1 value= %2\n", when, value));
_events.insert (i, new ControlEvent (when, value)); _events.insert (i, new ControlEvent (when, value));
if (with_guard) {
add_guard_point (when);
}
mark_dirty (); mark_dirty ();