for my tile editor I have 2 stacks of TileMaps, undo and redo. Every time the user makes a change the state of the map is added to the stack, than the change is made. Here is my undo code:
private void undoToolStripMenuItem_Click(object sender, EventArgs e)
{
if (undo.Count != 0)
{
redo.Push(tileMap);
tileMap = undo.Peek();
undo.Pop();
}
}
The map however does not change. Why?