diff options
author | Florian Jung <flo@windfisch.org> | 2013-09-19 23:21:39 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2013-09-19 23:21:39 +0200 |
commit | 93ec519ca799393fd2499097923d54af747f48c4 (patch) | |
tree | d8a9a5fad75249bf32c8ff03069991da5735a4ab | |
parent | 1e07c748f3a30da6794577cf7e9cb5d62812cfe5 (diff) |
addEvent is NOT deprecated. no need to assert(!hasClones())
-rw-r--r-- | muse2/muse/part.cpp | 6 | ||||
-rw-r--r-- | muse2/muse/part.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/muse2/muse/part.cpp b/muse2/muse/part.cpp index e6fb087d..14108b63 100644 --- a/muse2/muse/part.cpp +++ b/muse2/muse/part.cpp @@ -386,7 +386,6 @@ void removePortCtrlEvents(Part* part, bool doClones) iEvent Part::addEvent(Event& p) { - assert(!hasClones()); return _events.add(p); } @@ -491,7 +490,10 @@ Part* Part::duplicate() const // copy the eventlist; duplicate each Event(Ptr!). for (MusECore::ciEvent i = _events.begin(); i != _events.end(); ++i) - dup->addEvent(i->second.clone()); + { + Event nev = i->second.clone(); + dup->addEvent(nev); + } return dup; } diff --git a/muse2/muse/part.h b/muse2/muse/part.h index 02056a2d..55bac625 100644 --- a/muse2/muse/part.h +++ b/muse2/muse/part.h @@ -120,7 +120,7 @@ class Part : public PosLen { // Returns combination of HiddenEventsType enum. virtual int hasHiddenEvents() const { return _hiddenEvents; } - iEvent addEvent(Event& p); // DEPRECATED. requires the part to be NOT a clone. FIXME remove! + iEvent addEvent(Event& p); // this does not care about clones! If the part is a clone, be sure to execute this on all clones (with duplicated Events, that is!) virtual void write(int, Xml&, bool isCopy = false, bool forceWavePaths = false) const; |