added save and revert methods to pattern view