diff options
-rw-r--r-- | muse2/muse/functions.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/importmidi.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/part.cpp | 10 | ||||
-rw-r--r-- | muse2/muse/remote/pyapi.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/song.cpp | 10 | ||||
-rw-r--r-- | muse2/muse/songfile.cpp | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/muse2/muse/functions.cpp b/muse2/muse/functions.cpp index 7569cc95..45c665b1 100644 --- a/muse2/muse/functions.cpp +++ b/muse2/muse/functions.cpp @@ -1523,7 +1523,7 @@ bool merge_parts(const set<const Part*>& parts) { Event new_event=ev_it->second.clone(); new_event.setTick( new_event.tick() + (*p_it)->tick() - new_part->tick() ); - new_part->nonconst_events().add(new_event); + new_part->addEvent(new_event); } } diff --git a/muse2/muse/importmidi.cpp b/muse2/muse/importmidi.cpp index b0affa24..11e1db52 100644 --- a/muse2/muse/importmidi.cpp +++ b/muse2/muse/importmidi.cpp @@ -484,7 +484,7 @@ void MusE::processTrack(MusECore::MidiTrack* track) MusECore::Event& ev = i->second; int ntick = ev.tick() - startTick; ev.setTick(ntick); - part->nonconst_events().add(ev); + part->addEvent(ev); } tevents.erase(r1, r2); } diff --git a/muse2/muse/part.cpp b/muse2/muse/part.cpp index 1d246c50..e6fb087d 100644 --- a/muse2/muse/part.cpp +++ b/muse2/muse/part.cpp @@ -491,7 +491,7 @@ Part* Part::duplicate() const // copy the eventlist; duplicate each Event(Ptr!). for (MusECore::ciEvent i = _events.begin(); i != _events.end(); ++i) - dup->_events.add(i->second.clone()); + dup->addEvent(i->second.clone()); return dup; } @@ -723,11 +723,11 @@ void Part::splitPart(int tickpos, Part*& p1, Part*& p2) const if ((s2 > d1p1) && (s1 < d2p1)) { Event si = event.mid(d1p1 - ps, d2p1 - ps); - p1->_events.add(si); + p1->addEvent(si); } if ((s2 > d1p2) && (s1 < d2p2)) { Event si = event.mid(d1p2 - ps, d2p2 - ps); - p2->_events.add(si); + p2->addEvent(si); } } } @@ -737,10 +737,10 @@ void Part::splitPart(int tickpos, Part*& p1, Part*& p2) const int t = event.tick(); if (t >= l1) { event.move(-l1); - p2->_events.add(event); + p2->addEvent(event); } else - p1->_events.add(event); + p1->addEvent(event); } } } diff --git a/muse2/muse/remote/pyapi.cpp b/muse2/muse/remote/pyapi.cpp index 8f5abe06..fa3c1cdf 100644 --- a/muse2/muse/remote/pyapi.cpp +++ b/muse2/muse/remote/pyapi.cpp @@ -331,7 +331,7 @@ bool addPyPartEventsToMusePart(MidiPart* npart, PyObject* part) event.setC(data[2]); event.setTick(etick); event.setLenTick(elen); - npart->nonconst_events().add(event); + npart->addEvent(event); } else printf("Unhandled event type from python: %s\n", type.c_str()); @@ -409,7 +409,7 @@ PyObject* modifyPart(PyObject*, PyObject* part) if (event.type() == Note || event.type() == Controller) continue; - npart->nonconst_events()->add(event); + npart->addEvent(event); } addPyPartEventsToMusePart(npart, part); diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 926ba0ac..3c5b8fa7 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -490,7 +490,7 @@ bool Song::addEvent(Event& event, Part* part) return false; } - part->nonconst_events().add(event); + part->addEvent(event); return true; } @@ -511,7 +511,7 @@ void Song::changeEvent(Event& oldEvent, Event& newEvent, Part* part) else part->nonconst_events().erase(i); - part->nonconst_events().add(newEvent); + part->addEvent(newEvent); } //--------------------------------------------------------- @@ -752,7 +752,7 @@ void Song::cmdAddRecordedEvents(MidiTrack* mt, const EventList& events, unsigned // addEvent also adds port controller values. So does msgAddPart, below. Let msgAddPart handle them. //addEvent(event, part); if(newpart->events().find(event) == newpart->events().end()) - newpart->nonconst_events().add(event); + newpart->addEvent(event); } MusEGlobal::audio->msgAddPart(newpart); updateFlags |= SC_PART_INSERTED; @@ -2121,7 +2121,7 @@ void Song::recordEvent(MidiTrack* mt, Event& event) part->setLenTick(endTick - startTick); part->setName(mt->name()); event.move(-startTick); - part->nonconst_events().add(event); + part->addEvent(event); MusEGlobal::audio->msgAddPart(part); return; } @@ -2502,7 +2502,7 @@ int Song::execMidiAutomationCtlPopup(MidiTrack* track, MidiPart* part, const QPo part->setLenTick(endTick - startTick); part->setName(mt->name()); e.setTick(tick - startTick); - part->nonconst_events().add(e); + part->addEvent(e); // Allow undo. MusEGlobal::audio->msgAddPart(part); } diff --git a/muse2/muse/songfile.cpp b/muse2/muse/songfile.cpp index 78338bac..563a2203 100644 --- a/muse2/muse/songfile.cpp +++ b/muse2/muse/songfile.cpp @@ -304,7 +304,7 @@ Part* Part::readFromXml(Xml& xml, Track* track, bool doClone, bool toTrack) } else { - npart->_events.add(e); + npart->addEvent(e); } } else // ...Otherwise a clone was created, so we don't need the events. |