UNSOLVED Undo manager
andyclymer last edited by gferreira
Is there a recommended way to build undo/redo functionality into my own tool, using RoboFont's undo manager? I'd like to be able to undo changes within the Vanilla interface, but also changes to some of my own objects. Is there an extension somewhere that already does this that I can have a look at?
could you provide an example what you want to undo?
I would propose to use the
glyph.libas data storage and call
glyph.lib.performUndo()when you are done.
andyclymer last edited by
It's in my BlueZoneEditor tool...
There's a delay when reading/writing to the
font.infoso I hold all of the zone data aside, it makes the editing feel smoother and more interactive. It's a little bit overkill but each of the blue zones are their own object, and I'd like for changes to those objects to be undoable.
I think I'll take your advice and see if it still feels quick enough to read/write them into the
font.libeven though there's still a tiny delay when doing this, but that might be better than how I have it now.
Thanks for the suggestion!
mmm I see the problem is that its edits the blue zones, and when the font info has changed, RF will update tons of views and cells...
I would store it temporarily in
font.libwhile editing (as you want to jump to different glyphs and see the same values). When not editing (dragging fe) write it back in the