summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}