summaryrefslogtreecommitdiff
path: root/muse2/muse/arranger/pcanvas.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2012-01-03 17:26:09 +0000
committerFlorian Jung <flo@windfisch.org>2012-01-03 17:26:09 +0000
commit1bc4ba9dfc00b6e7511fbf4765296a2002f83315 (patch)
treedf6a0d5d9b61d64005dd368afea0aea11ab0a6b3 /muse2/muse/arranger/pcanvas.cpp
parentb988a0a27bc175ce10bc8fa53ed131486813f3e7 (diff)
merged with release_2_0
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 05b7b12a..57232d42 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -379,7 +379,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 :/
//
@@ -396,11 +396,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 FINDMICH: is this 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 FINDMICH: is this still correct (by flo93)? i doubt it!