Adding undo for when filling or deleting a region.