summaryrefslogtreecommitdiff
path: root/muse2/muse/arranger/pcanvas.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-08-30 17:00:30 +0000
committerFlorian Jung <flo@windfisch.org>2011-08-30 17:00:30 +0000
commita7fba3acdfaa382effcc02633708d7cf5a7ec2a4 (patch)
tree5950956341c8f2cb8f8f7cae59ddefed1d168f01 /muse2/muse/arranger/pcanvas.cpp
parent8c37b557d6f865b4320f7b1168030e7d54adacd0 (diff)
improved movePartsToTheRight and merged with globalInsert
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 572492d6..19e53f2e 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -27,6 +27,7 @@
#include "widgets/tools.h"
#include "arranger.h"
#include "arrangerview.h"
+#include "structure.h"
#include "pcanvas.h"
#include "midieditor.h"
#include "globals.h"
@@ -2879,40 +2880,6 @@ void PartCanvas::paste(bool clone, bool toTrack, bool doInsert)
}
//---------------------------------------------------------
-// movePartsToTheRight
-//---------------------------------------------------------
-Undo PartCanvas::movePartsTotheRight(unsigned int startTicks, int length)
-{
- Undo operations;
-
- // all parts that start after the pasted parts will be moved the entire length of the pasted parts
- for (iCItem i = items.begin(); i != items.end(); ++i) {
- if (!i->second->isSelected()) {
- Part* part = i->second->part();
- if (part->tick() >= startTicks) {
- Part *newPart = part->clone();
- newPart->setTick(newPart->tick()+length);
-
- operations.push_back(UndoOp(UndoOp::ModifyPart,part,newPart,false,false));
- }
- }
- }
- // perhaps ask if markers should be moved?
- MarkerList *markerlist = song->marker();
- for(iMarker i = markerlist->begin(); i != markerlist->end(); ++i)
- {
- Marker* m = &i->second;
- if (m->tick() >= startTicks) {
- Marker *oldMarker = new Marker();
- *oldMarker = *m;
- m->setTick(m->tick()+length);
- operations.push_back(UndoOp(UndoOp::ModifyMarker,oldMarker, m));
- }
- }
-
- return operations;
-}
-//---------------------------------------------------------
// startDrag
//---------------------------------------------------------