From 93ec519ca799393fd2499097923d54af747f48c4 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 19 Sep 2013 23:21:39 +0200 Subject: addEvent is NOT deprecated. no need to assert(!hasClones()) --- muse2/muse/part.cpp | 6 ++++-- 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; -- cgit v1.2.1