more efficient undo of deleted layers
fixing the undo-redo statusmode on layerchange