Adding undo when filling a region.