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:
parent
b732aa2ca1
commit
deba170d6c
@ -167,13 +167,14 @@ AutomationList&
|
||||
AutomationList::operator= (const AutomationList& other)
|
||||
{
|
||||
if (this != &other) {
|
||||
|
||||
ControlList::freeze ();
|
||||
/* ControlList::operator= calls copy_events() which calls
|
||||
* mark_dirty() and maybe_signal_changed()
|
||||
*/
|
||||
ControlList::operator= (other);
|
||||
_state = other._state;
|
||||
_touching = other._touching;
|
||||
|
||||
mark_dirty ();
|
||||
maybe_signal_changed ();
|
||||
ControlList::thaw ();
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user