logic error in AutomationEvent::cut_copy_clear() when deciding whether to add an extra final point to an automation list

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7169 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-05-26 20:41:58 +00:00
parent ae8b97416a
commit 32593eb61c

View file

@ -1147,11 +1147,11 @@ AutomationList::cut_copy_clear (double start, double end, int op)
/* only add a boundary point if there is a point after "end"
*/
if (op == 0 && (e != events.end() || end < (*e)->when)) { // cut
if (op == 0 && (e != events.end() && end < (*e)->when)) { // cut
events.insert (e, point_factory (end, end_value));
}
if (op != 2 && (e != events.end() || end < (*e)->when)) { // cut/copy
if (op != 2 && (e != events.end() && end < (*e)->when)) { // cut/copy
nal->events.push_back (point_factory (end - start, end_value));
}
}