private void StoreFullNewState() { // stores the entire state of the document as a RestorePoint on the undoredo-stack var restorePoint = new RestorePoint(); foreach (var layer in _document.Layers) { restorePoint.StoreNewState(layer); } _undoStack.Add(restorePoint); UndoStackChanged?.Invoke(this, EventArgs.Empty); }
internal void AddRestorePoint(RestorePoint restorePoint) { _undoStack.Add(restorePoint); UndoStackChanged?.Invoke(this, EventArgs.Empty); }
internal DocumentManipulationScope(DocumentManipulator documentManipulator, Document document) { _documentManipulator = documentManipulator; _document = document; _restorePoint = new RestorePoint(); }