mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
67 stars 20 forks source link

Make the tagging of vertices and edges undoable. #33

Closed tinevez closed 6 years ago

tinevez commented 7 years ago

As of now, only properties of the Model are undoable because the recorder are created at model construction time. TagSets are based on PropertyMaps so they could be made undoable, but right now it does not work because they are not registered in the GraphUndoRecorder

ctrueden commented 7 years ago

Any chance we can generalize the undo logic so that all of ImageJ2 can benefit? Or is it too big of a project? See imagej/imagej-common#3

tpietzsch commented 7 years ago

@ctrueden Some notes explaining the mastodon undo framework: https://gist.github.com/tpietzsch/b597b2ad8062d52dcad375a810473523 It has kind of a "hybrid" undo history (as mentioned in imagej/imagej-common#3) so the general ideas seem applicable. That being said, the mastodon undo framework is in its second (and possibly not final) iteration, still too rough that I would recommend it as a starting point for generalization.

ctrueden commented 7 years ago

the mastodon undo framework is in its second (and possibly not final) iteration, still too rough that I would recommend it as a starting point for generalization.

Perhaps we could revisit then after it iterates a couple more times? Please just keep it in mind for the future of ImageJ2, that if you can make a general enough undo framework, we could push it to the SciJava layer in the future.

Or maybe to put another way: Mastodon can serve as a big use case for how flexible a general SciJava undo framework would need to be in order to support its requirements for undo. Reading over your notes, we probably want (some day) a general undo framework in SciJava with plugins. And Mastodon simply implements such a plugin using its scheme described in your gist, no?

Thanks guys!

tinevez commented 6 years ago

@tpietzsch We can close this issue right? You addressed it all in the last weeks if I remember correctly.

tpietzsch commented 6 years ago

👍