diff options
Diffstat (limited to 'muse2/muse/wave.cpp')
-rw-r--r-- | muse2/muse/wave.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/muse2/muse/wave.cpp b/muse2/muse/wave.cpp index 8c647685..9bf26753 100644 --- a/muse2/muse/wave.cpp +++ b/muse2/muse/wave.cpp @@ -826,11 +826,11 @@ bool SndFile::checkCopyOnWrite() PartList* pl = (*it)->parts(); for(ciPart ip = pl->begin(); ip != pl->end(); ++ip) { - EventList* el = ip->second->events(); + const EventList& el = ip->second->events(); // We are looking for active independent non-clone parts - if(el->arefCount() > 1) + if(ip->second->hasClones()) continue; - for(ciEvent ie = el->begin(); ie != el->end(); ++ie) + for(ciEvent ie = el.begin(); ie != el.end(); ++ie) { if(ie->second.type() != Wave) continue; @@ -1114,7 +1114,10 @@ void Song::cmdAddRecordedWave(MusECore::WaveTrack* track, MusECore::Pos s, MusEC event.setLenFrame(e.frame() - s.frame()); part->addEvent(event); - MusEGlobal::song->cmdAddPart(part); + // TODO FIXME that's ugly (flo) + addPart(part); + addUndo(UndoOp(UndoOp::AddPart, part)); + updateFlags = SC_PART_INSERTED; if (MusEGlobal::song->len() < etick) MusEGlobal::song->setLen(etick); |