add undo to instrument editor (check for diffs on the current DivInstrument in insEdit, record them in a stack)

This commit is contained in:
Adam Lederer 2024-08-04 21:07:08 -07:00 committed by tildearrow
parent a318508b40
commit 5c9fd69ac1
8 changed files with 307 additions and 55 deletions

View file

@ -73,6 +73,8 @@ void FurnaceGUI::doAction(int what) {
case GUI_ACTION_UNDO:
if (curWindow==GUI_WINDOW_SAMPLE_EDIT) {
doUndoSample();
} else if (curWindow==GUI_WINDOW_INS_EDIT) {
doUndoInstrument();
} else {
doUndo();
}
@ -80,6 +82,8 @@ void FurnaceGUI::doAction(int what) {
case GUI_ACTION_REDO:
if (curWindow==GUI_WINDOW_SAMPLE_EDIT) {
doRedoSample();
} else if (curWindow==GUI_WINDOW_INS_EDIT) {
doRedoInstrument();
} else {
doRedo();
}