private void redoToolStripMenuItem_Click(object sender, EventArgs e) { if (mapRedoActions.Count == 0) { return; } IMapAction lastAction = mapRedoActions.Last.Value; mapRedoActions.RemoveLast(); mapUndoActions.AddLast(lastAction); // to be able to undo what has been redone lastAction.Redo(activeMap); RefreshMapActionUI(lastAction); }
private void redoToolStripMenuItem_Click(object sender, EventArgs e) { if (mapRedoActions.Count == 0) { return; } IMapAction lastAction = mapRedoActions.Last.Value; mapRedoActions.RemoveLast(); mapUndoActions.AddLast(lastAction); // to be able to undo what has been redone lastAction.Redo(activeMap); activeMap.IsModified = changeSinceRender = true; pnlImage.Image = activeMap.GetRenderedMap(showTiles, showObjects); Invalidate(); }