On Sat, Feb 26, 2011 at 12:43 AM, Andy Allan <[email protected]> wrote: > This is where I could be wrong, but I think that it's critical to the > redo part. When undo'ing an action the action is added to the redo > list, so if adding an action has side-effects that'll blow up during > redoing the action. Also, if the action works based on side effects > that aren't tracked within the action itself, then it won't work > properly when being redone.
Ok, I obviously wasn't explaining myself well, so I'll let some code do the talking: http://trac.openstreetmap.org/changeset/25431 This solves my problem: actions are carried out immediately, and then added to the MainUndoStack later. It's not that the actions had "side effects", I just needed access to the "main effect" immediately. The difference is from this: Create action A Create action B Create action C Add to main undo stack - do action A - do action B - do action C To this: Create action A - do action A Create action B - do action B Create action C - do cation C Add to main undo stack - (already done). I might be overlooking something, of course. I still get a couple of spurious entries in the undo list which I haven't really investigated yet. And there were some weird fake duplicate nodes being shown, which might be a symptom of node state not being managed properly. Steve _______________________________________________ Potlatch-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/potlatch-dev
