summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2013-09-01 20:29:28 +0200
committerFlorian Jung <flo@windfisch.org>2013-09-01 20:29:28 +0200
commit724f552586702a7189ac30553bcbcd0fed0e6f84 (patch)
tree0f5560f1f35d3181f1efd63de8c24056ef1fc5dc /muse2
parent5043dec335ff43074e0cb7ece5d0635d2f430d4e (diff)
fixes
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/song.cpp2
-rw-r--r--muse2/muse/undo.cpp10
2 files changed, 5 insertions, 7 deletions
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index 7e6c08d0..f0b9984b 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -1647,6 +1647,7 @@ void Song::undo()
MusEGlobal::audio->msgRevertOperationGroup(opGroup);
+ redoList->push_back(opGroup);
undoList->pop_back();
MusEGlobal::redoAction->setEnabled(true);
@@ -1675,6 +1676,7 @@ void Song::redo()
MusEGlobal::audio->msgExecuteOperationGroup(opGroup);
+ undoList->push_back(opGroup);
redoList->pop_back();
MusEGlobal::undoAction->setEnabled(true);
diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp
index 6d22d440..e7ef611b 100644
--- a/muse2/muse/undo.cpp
+++ b/muse2/muse/undo.cpp
@@ -317,10 +317,11 @@ void prepareOperationGroup(Undo& group)
op=op_;
}
- // replicate Event modifications to keep clones up to date
+ // replicate Event modifications to keep clones up to date.
+ // do not replicate SelectEvent because... umm, it just doesn't feel right.
for (iUndoOp op=group.begin(); op!=group.end(); op++)
{
- if (op->type==UndoOp::AddEvent || op->type==UndoOp::DeleteEvent || op->type==UndoOp::ModifyEvent || op->type==UndoOp::SelectEvent)
+ if (op->type==UndoOp::AddEvent || op->type==UndoOp::DeleteEvent || op->type==UndoOp::ModifyEvent)
{
for (const Part* it = op->part->nextClone(); it!=op->part; it=it->nextClone())
{
@@ -331,11 +332,6 @@ void prepareOperationGroup(Undo& group)
newop = UndoOp(UndoOp::DeleteEvent, it->events().findSimilar(op->nEvent)->second, it, op->doCtrls, op->doClones);
else if (op->type==UndoOp::ModifyEvent)
newop = UndoOp(UndoOp::ModifyEvent, op->nEvent.clone(), it->events().findSimilar(op->oEvent)->second, it, op->doCtrls, op->doClones);
- else if (op->type==UndoOp::SelectEvent)
- {
- const Event& found = it->events().findSimilar(op->nEvent)->second;
- newop= UndoOp(UndoOp::SelectEvent, found, op->selected, found.selected());
- }
group.insert(op, newop);
}