diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-18 17:34:12 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-18 17:36:15 +0200 |
commit | 8b2fb88f158dee9795923c31aadd4025310d6837 (patch) | |
tree | 5bafc22c3a19682e0f0b47a127338700064c69d9 /libs/evoral/evoral | |
parent | c12e8cc47c8f3dcc6508a4e0734818c2a4fc38f1 (diff) |
fix ever increasing MIDI event IDs
Iterating over a const Midi-Sequence calls Evoral::Sequence::set_event(),
which in turn used Evoral::Event::operator=() which always created
a new event-ID (create copy of the event).
Issues fixed:
- Saving *unmodified* MIDI produced new event-IDs on every save;
files changed with every save. - greetings to Deva.
- all [GUI] operations that use IDs to refer to notes e.g. undo.
invalid undo-history.
Also clarify assignment operator name. Prefer explicit assign() over =.
Diffstat (limited to 'libs/evoral/evoral')
-rw-r--r-- | libs/evoral/evoral/Event.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/evoral/evoral/Event.hpp b/libs/evoral/evoral/Event.hpp index ec92d575d0..2a6810a3b4 100644 --- a/libs/evoral/evoral/Event.hpp +++ b/libs/evoral/evoral/Event.hpp @@ -61,7 +61,7 @@ public: ~Event(); - const Event& operator=(const Event& copy); + void assign (const Event& other); void set(const uint8_t* buf, uint32_t size, Time t); |