diff options
author | Florian Jung <flo@windfisch.org> | 2011-07-02 15:38:16 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-07-02 15:38:16 +0000 |
commit | 99934de53a85e71c8a33c1f39f16eb46d2df3cb7 (patch) | |
tree | 66ad7a4e90a88118984c11bab6eb0a12a2d177b9 /muse2/muse/midiedit/dcanvas.cpp | |
parent | 363cebc27a30edcca80fe24f1b535dc0b39efd15 (diff) |
fixed two bugs:
- don't first resize parts and then deal with the old part pointer
- the scoreedit now behaves as the canvases when dealing with hidden
notes (begin tick must be inside the part, not end tick)
Diffstat (limited to 'muse2/muse/midiedit/dcanvas.cpp')
-rw-r--r-- | muse2/muse/midiedit/dcanvas.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp index b9ff5a20..d0a5ee31 100644 --- a/muse2/muse/midiedit/dcanvas.cpp +++ b/muse2/muse/midiedit/dcanvas.cpp @@ -165,8 +165,6 @@ Undo DrumCanvas::moveCanvasItems(CItemList& items, int dp, int dx, DragType dtyp forbidden=true; break; } - - schedule_resize_all_same_len_clone_parts(opart, opart->lenTick() + diff, operations); } @@ -206,6 +204,14 @@ Undo DrumCanvas::moveCanvasItems(CItemList& items, int dp, int dx, DragType dtyp if(dtype == MOVE_COPY || dtype == MOVE_CLONE) selectItem(ci, false); } + + for(iPartToChange ip2c = parts2change.begin(); ip2c != parts2change.end(); ++ip2c) + { + Part* opart = ip2c->first; + int diff = ip2c->second.xdiff; + + schedule_resize_all_same_len_clone_parts(opart, opart->lenTick() + diff, operations); + } return operations; } @@ -354,7 +360,7 @@ void DrumCanvas::newItem(CItem* item, bool noSnap, bool replace) { schedule_resize_all_same_len_clone_parts(part, event.endTick(), operations); printf("newItem: extending\n"); - } + } } //else forbid action by not applying it song->applyOperationGroup(operations); |