GUI: sample edit undo/redo!

it seems to work but if you find bugs/crashes tell me
This commit is contained in:
tildearrow 2022-03-23 00:42:59 -05:00
parent f45273c89c
commit afc701b0b9
5 changed files with 116 additions and 18 deletions

View file

@ -189,9 +189,10 @@ struct DivSample {
/**
* prepare an undo step for this sample.
* @param data whether to include sample data.
* @param doNotPush if this is true, don't push the DivSampleHistory to the undo history.
* @return the undo step.
*/
DivSampleHistory* prepareUndo(bool data);
DivSampleHistory* prepareUndo(bool data, bool doNotPush=false);
/**
* undo. you may need to call DivEngine::renderSamples afterwards.