diff options
author | Florian Jung <flo@windfisch.org> | 2012-01-03 19:13:48 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-01-03 19:13:48 +0000 |
commit | 7993a73cece885bac45021dd021ac43f6f332040 (patch) | |
tree | 2f8296b31efa6d93cb53b8b735519163ec163a84 /muse2/muse/arranger/pcanvas.cpp | |
parent | 845d28b2fba8f2c1d4211aee7beb5ab041315531 (diff) | |
parent | 1bc4ba9dfc00b6e7511fbf4765296a2002f83315 (diff) |
merged with trunk
added "copy drummap" to duplicate track dialog
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index fc0014e2..897ae1c8 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -380,7 +380,7 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& if(t == MOVE_MOVE) item->setPart(dpart); if (t == MOVE_COPY && !clone) { - dpart->events()->incARef(-1); // the later MusEGlobal::song->applyOperationGroup() will increment it + //dpart->events()->incARef(-1); // the later MusEGlobal::song->applyOperationGroup() will increment it // so we must decrement it first :/ // @@ -397,11 +397,19 @@ bool PartCanvas::moveItem(MusECore::Undo& operations, CItem* item, const QPoint& if (t == MOVE_COPY || t == MOVE_CLONE) { + dpart->events()->incARef(-1); // the later MusEGlobal::song->applyOperationGroup() will increment it + // so we must decrement it first :/ // These will not increment ref count, and will not chain clones... // TODO: is this comment still correct (by flo93)? i doubt it! operations.push_back(MusECore::UndoOp(MusECore::UndoOp::AddPart,dpart)); } else if (t == MOVE_MOVE) { + // In all cases found ev lists were same. So this is redundant - Redo incs then decs the same list. + // But just in case we ever have two different lists... + dpart->events()->incARef(-1); // the later MusEGlobal::song->applyOperationGroup() will increment it + // so we must decrement it first :/ + spart->events()->incARef(1); // the later MusEGlobal::song->applyOperationGroup() will decrement it + // so we must increment it first :/ dpart->setSelected(spart->selected()); // These will increment ref count if not a clone, and will chain clones... // TODO: is this comment still correct (by flo93)? i doubt it! |