When I use undo, the picture in the undo is applied to whatever layer is the current one. Instead It should store the layer GUID to identify on which layer to apply the undo. I have tried the Timageenproc.GetUndoInfo, but it does not give me any information about which layer the undo belongs to.