pwSaveState Saves the current state so that pwUndo will restore the current state. Attention: Some functions use internally pwSaveState. pwUndo will only restore the state when pwSaveState was called the last time, independent of a user or internal function call. If you want to be sure that a working state is saved, then use pwSaveRepository to save it to harddisk and reload it with pwLoadRepository if neccessary.