Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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();
 }