Consistent ControlList freezing -- fixes #7419

AudioRegion::set_fade_in() freezes the original ControlList, then
assigns a new one and thaws that.
Frozen state needs to be retained during assignment.

Related: The overloaded assignment operator in AutomationList
performed duplicate signal emission and didn't freeze the list.
This commit is contained in:
Robin Gareus 2017-07-07 02:34:09 +02:00
parent b732aa2ca1
commit deba170d6c
2 changed files with 7 additions and 6 deletions

View file

@ -152,7 +152,8 @@ ControlList&
ControlList::operator= (const ControlList& other)
{
if (this != &other) {
_frozen = 0;
/* list should be frozen before assignment */
assert (_frozen > 0);
_changed_when_thawed = false;
_sort_pending = false;
@ -166,7 +167,6 @@ ControlList::operator= (const ControlList& other)
_desc = other._desc;
_interpolation = other._interpolation;
// XXX copy_events() emits Dirty, but this is just assignment copy/construction
copy_events (other);
}