Closed GoogleCodeExporter closed 9 years ago
Thanks for the patch, I've just tested it and it certainly seems to do the job!
Just one potential niggle - shouldn't the undo/redo buffer be reset after
loading a new preset? Because undo/redo will no longer get you back to the
sound you had before...
Original comment by nickdowell
on 18 Feb 2014 at 6:17
Thanks for checking it out! I agree that the buffers should be cleared between
presets, and that's how it behaves for me - the call to
Preset::clearUndoStacks() that I put in the Preset = operator overload and
Preset::fromString are there for that reason. What behaviour are you seeing?
(did I miss an edge case, or does it just never clear for you?)
Original comment by joshua.t...@gmail.com
on 19 Feb 2014 at 12:53
My bad; I think I got confused during testing.
What I think happened is I hit ctrl-R to randomize all the values (which is
kind of like loading a new, albeit random, sound). In this case the undo buffer
is not cleared but hitting undo will not go back to your previous sound.
What do you think should happen in this case? I think we should either clear
the undo buffer (because it will not do what the user really wants it to do) or
find a way to undo a randomize event - but I can see that's a little trickier
to implement so don't mind either way.
Original comment by nickdowell
on 19 Feb 2014 at 6:06
Ahhhh, got it. I think there's a lot of value in implementing undo for
randomization as well (have you ever heard a really cool sound while
randomizing and accidentally skipped past it?) - I'll provide a patch that
handles this as soon as I can.
Original comment by joshua.t...@gmail.com
on 21 Feb 2014 at 3:32
This patch (also against the current public code) supports undo/redo for
arbitrary sequences of parameter changes and randomisations. The buffers clear
when changing to a new preset (I've tried to address every possible way in
which this can happen). Let me know what you think!
Josh
Original comment by joshua.t...@gmail.com
on 22 Feb 2014 at 5:54
Attachments:
Works like a charm; thanks!
Patch now applied to main repo.
Original comment by nickdowell
on 1 Mar 2014 at 3:04
Original issue reported on code.google.com by
joshua.t...@gmail.com
on 17 Feb 2014 at 4:03Attachments: