From c5e6fd0f6dfbf18847b601668ba8c657d776da31 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Wed, 28 Aug 2013 00:49:49 +0200 Subject: operations are now replicated for all clones. minor cleanups. it compiles and seems to work again! :) --- muse2/muse/arranger/pcanvas.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'muse2/muse/arranger/pcanvas.cpp') diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index c3c3bcb8..a280d58b 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -353,7 +353,7 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& ntrack = tracks->size(); if (MusEGlobal::debugMsg) printf("PartCanvas::moveItem - add new track\n"); - dtrack = MusEGlobal::song->addTrack(operations, type); // Add at end of list. + dtrack = MusEGlobal::song->addTrack(type); // Add at end of list. Creates additional Undo entry. if (type == MusECore::Track::WAVE) { MusECore::WaveTrack* st = (MusECore::WaveTrack*) track; @@ -385,8 +385,7 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& MusECore::Part* dpart; bool clone = (t == MOVE_CLONE || (t == MOVE_COPY && spart->hasClones())); - // This increments aref count if cloned, and chains clones. - // It also gives the new part a new serial number. + // Gives the new part a new serial number. if (clone) dpart = spart->createNewClone(); else @@ -2756,13 +2755,9 @@ void PartCanvas::viewDropEvent(QDropEvent* event) if (!track) { // we need to create a track for this drop if (text.endsWith(".mpt", Qt::CaseInsensitive)) { - MusECore::Undo operations; - track = MusEGlobal::song->addTrack(operations, MusECore::Track::MIDI); // Add at end of list. - MusEGlobal::song->applyOperationGroup(operations); + track = MusEGlobal::song->addTrack(MusECore::Track::MIDI); // Add at end of list. } else { - MusECore::Undo operations; - track = MusEGlobal::song->addTrack(operations, MusECore::Track::WAVE); // Add at end of list. - MusEGlobal::song->applyOperationGroup(operations); + track = MusEGlobal::song->addTrack(MusECore::Track::WAVE); // Add at end of list. } } if (track->type() == MusECore::Track::WAVE && -- cgit v1.2.3