summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/muse/part.cpp6
-rw-r--r--muse2/muse/part.h2
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;