diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-08 17:57:47 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-08 17:57:47 +0000 |
commit | d7716b055c3fc792d4f70df51bbc37f0e6220573 (patch) | |
tree | 73c8e97fc15e9c2272197ea93ce60164c8b07cf5 /libs/evoral/src/ControlList.cpp | |
parent | 474731326113befcebd35bd81638a09996dbe035 (diff) |
fix automation/control list behaviour when manually adding a point within existing data
git-svn-id: svn://localhost/ardour2/branches/3.0@13619 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/src/ControlList.cpp')
-rw-r--r-- | libs/evoral/src/ControlList.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp index 7db4e74650..870fc43cb6 100644 --- a/libs/evoral/src/ControlList.cpp +++ b/libs/evoral/src/ControlList.cpp @@ -517,12 +517,24 @@ ControlList::add (double when, double value) } else { /* not in a write pass: figure out the iterator we should insert in front of */ - + + DEBUG_TRACE (DEBUG::ControlList, string_compose ("compute MRI for position %1\n", when)); ControlEvent cp (when, 0.0f); most_recent_insert_iterator = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); } - } - + + } else { + + /* not in a write pass, adding a point within existing + * data: figure out the iterator we should insert in + * front of + */ + + DEBUG_TRACE (DEBUG::ControlList, string_compose ("compute(b) MRI for position %1\n", when)); + ControlEvent cp (when, 0.0f); + most_recent_insert_iterator = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); + } + /* OK, now we're really ready to add a new point */ |