Make Evoral::Event ids unique always.
- probably fixes a lot of cases where note ids are assumed to be unique (they weren't for copies and some others). - wrong branch, but it needs testing.
This commit is contained in:
parent
9a55bcb04f
commit
92b69a17da
@ -86,7 +86,7 @@ Event<Timestamp>::Event(const Event& copy, bool owns_buf)
|
|||||||
, _nominal_time(copy._nominal_time)
|
, _nominal_time(copy._nominal_time)
|
||||||
, _size(copy._size)
|
, _size(copy._size)
|
||||||
, _buf(copy._buf)
|
, _buf(copy._buf)
|
||||||
, _id(copy.id())
|
, _id (next_event_id ())
|
||||||
, _owns_buf(owns_buf)
|
, _owns_buf(owns_buf)
|
||||||
{
|
{
|
||||||
if (owns_buf) {
|
if (owns_buf) {
|
||||||
@ -110,7 +110,7 @@ template<typename Timestamp>
|
|||||||
const Event<Timestamp>&
|
const Event<Timestamp>&
|
||||||
Event<Timestamp>::operator=(const Event& copy)
|
Event<Timestamp>::operator=(const Event& copy)
|
||||||
{
|
{
|
||||||
_id = copy.id(); // XXX is this right? do we want ID copy semantics?
|
_id = next_event_id ();
|
||||||
_type = copy._type;
|
_type = copy._type;
|
||||||
_original_time = copy._original_time;
|
_original_time = copy._original_time;
|
||||||
_nominal_time = copy._nominal_time;
|
_nominal_time = copy._nominal_time;
|
||||||
|
Loading…
Reference in New Issue
Block a user