fix ever increasing MIDI event IDs
authorRobin Gareus <robin@gareus.org>
Fri, 18 Sep 2015 15:34:12 +0000 (17:34 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 18 Sep 2015 15:36:15 +0000 (17:36 +0200)
commit8b2fb88f158dee9795923c31aadd4025310d6837
tree5bafc22c3a19682e0f0b47a127338700064c69d9
parentc12e8cc47c8f3dcc6508a4e0734818c2a4fc38f1
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 =.
libs/evoral/evoral/Event.hpp
libs/evoral/src/Event.cpp
libs/evoral/src/Sequence.cpp