summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2013-08-22 16:53:58 +0200
committerFlorian Jung <flo@windfisch.org>2013-08-22 16:53:58 +0200
commitd1689a28f1f2f92f4653e42c88b5ebc5b2e49140 (patch)
treeb5384fcaf9a69323de7ded5a4d0cc375138477a8 /muse2
parentc1d220283956a50c60678e6703c919b13ed7403f (diff)
fixed insane ModifyEvent old/new twist
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/undo.cpp15
-rw-r--r--muse2/muse/undo.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp
index 5dbe1e9e..3d2804c6 100644
--- a/muse2/muse/undo.cpp
+++ b/muse2/muse/undo.cpp
@@ -418,10 +418,10 @@ void Song::doUndo2()
break;
case UndoOp::ModifyEvent:
if(i->doCtrls)
- removePortCtrlEvents(i->oEvent, editable_part, i->doClones);
- changeEvent(i->oEvent, i->nEvent, editable_part);
+ removePortCtrlEvents(i->nEvent, editable_part, i->doClones);
+ changeEvent(i->nEvent, i->oEvent, editable_part);
if(i->doCtrls)
- addPortCtrlEvents(i->nEvent, editable_part, i->doClones);
+ addPortCtrlEvents(i->oEvent, editable_part, i->doClones);
updateFlags |= SC_EVENT_MODIFIED;
break;
case UndoOp::AddTempo:
@@ -536,10 +536,10 @@ void Song::doRedo2()
break;
case UndoOp::ModifyEvent:
if(i->doCtrls)
- removePortCtrlEvents(i->nEvent, editable_part, i->doClones);
- changeEvent(i->nEvent, i->oEvent, editable_part);
+ removePortCtrlEvents(i->oEvent, editable_part, i->doClones);
+ changeEvent(i->oEvent, i->nEvent, editable_part);
if(i->doCtrls)
- addPortCtrlEvents(i->oEvent, editable_part, i->doClones);
+ addPortCtrlEvents(i->nEvent, editable_part, i->doClones);
updateFlags |= SC_EVENT_MODIFIED;
break;
case UndoOp::AddTempo:
@@ -631,8 +631,7 @@ UndoOp::UndoOp(UndoType type_, const Part* part_, bool selected_, bool sel_old_)
selected_old=sel_old_;
}
-
-UndoOp::UndoOp(UndoType type_, const Event& oev, const Event& nev, const Part* part_, bool doCtrls_, bool doClones_)
+UndoOp::UndoOp(UndoType type_, const Event& nev, const Event& oev, const Part* part_, bool doCtrls_, bool doClones_)
{
assert(type_==ModifyEvent);
assert(part_);
diff --git a/muse2/muse/undo.h b/muse2/muse/undo.h
index 6c372624..f0bf35fc 100644
--- a/muse2/muse/undo.h
+++ b/muse2/muse/undo.h
@@ -116,7 +116,7 @@ struct UndoOp {
UndoOp(UndoType type, const Part* part, unsigned old_len_or_tick=-1, unsigned new_len_or_tick=-1, bool doCtrls=false, bool doClones=false); // FIXME these bools are UNUSED!!. XTICKS!
UndoOp(UndoType type, const Part* part, const char* old_name, const char* new_name);
UndoOp(UndoType type, const Part* part, bool selected, bool selected_old);
- UndoOp(UndoType type, const Event& oev, const Event& nev, const Part* part, bool doCtrls, bool doClones);
+ UndoOp(UndoType type, const Event& nev, const Event& oev, const Part* part, bool doCtrls, bool doClones);
UndoOp(UndoType type, const Event& nev, const Part* part, bool doCtrls, bool doClones);
UndoOp(UndoType type, const Event& nev, bool selected, bool selected_old);
UndoOp(UndoType type, const char* changedFile, const char* changeData, int startframe, int endframe);