mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Add new SharedStatefulProperty which manages a shared_ptr to
some Stateful object, and a subclass to use this for AutomationList. SharedStatefulProperty will manage undo / redo using full copies of the XML state, like MementoCommand, but does it within the Property undo system. git-svn-id: svn://localhost/ardour2/branches/3.0@12740 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9429401f11
commit
5ac22e9095
18 changed files with 524 additions and 113 deletions
|
|
@ -1529,5 +1529,33 @@ ControlList::set_thinning_factor (double v)
|
|||
_thinning_factor = v;
|
||||
}
|
||||
|
||||
bool
|
||||
ControlList::operator!= (ControlList const & other) const
|
||||
{
|
||||
if (_events.size() != other._events.size()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
EventList::const_iterator i = _events.begin ();
|
||||
EventList::const_iterator j = other._events.begin ();
|
||||
|
||||
while (i != _events.end() && (*i)->when == (*j)->when && (*i)->value == (*j)->value) {
|
||||
++i;
|
||||
++j;
|
||||
}
|
||||
|
||||
if (i != _events.end ()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
_parameter != other._parameter ||
|
||||
_interpolation != other._interpolation ||
|
||||
_min_yval != other._min_yval ||
|
||||
_max_yval != other._max_yval ||
|
||||
_default_value != other._default_value
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace Evoral
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue