rostam / GraphTea

The Graph Theory Software
http://graphtheorysoftware.com/
85 stars 28 forks source link

undo / redo #14

Open azinazadi opened 11 years ago

azinazadi commented 11 years ago

we had a action based undo / redo, which was very problematic. for every action we had to define undo and redo methods. then we switched to a time based undo / redo , which saves the graph state every two seconds. this makes it easier to write new actions and extensions, but still is not finished.

currently it save the graph state in json. it can be other things like our new simplegraph format. we should think about a good format, and the rest is almost done. the code is at:

UndoManager, UndoAction, RedoAction

ghost commented 10 years ago

Dear Azin,

I have changed the code in UndoManager, UndoAction and RedoAction. Now it saves graph state directly in GraphModel type. Is it ok? If so, I'll commit the changes.