QML plugin coding: can I call "undo"?
I've added some plugin functionality, see image, that authors entertaining little notations (note on/off time divergence) into the score. While this is truly ideal for making a tutorial (in progress/TBD), most of the time you just want those to go away once you've looked at them. Well, they sure are undoable with startCmd/endCmd, but you have to leave the plugin to "undo". I'd like my "undo" button to do the same thing. Although I can (and now do) keep and execute my own undo directions, that still leaves old info on the app Undo stack that doesn't belong there. I tried not using startCmd/endCmd at all, but that seemed to break to UI functionality. I had to put startCmd/endCmd around my own undoing code, too, now leaving two unwanted artifacts on the Undo Stack.
What's the right way to do this? Is there and Undo API call, or should there be?
Attachment | Size |
---|---|
inScoreShowTimes.png | 179.25 KB |
Comments
DLLarson found cmd("undo"). This seems to work perfectly ....
In reply to DLLarson found cmd("undo"). … by [DELETED] 1831606
That's indeed the correct (undocumented) way to trigger the undo command.