diff options
Diffstat (limited to 'src/composite-undo-stack-observer.cpp')
| -rw-r--r-- | src/composite-undo-stack-observer.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/composite-undo-stack-observer.cpp b/src/composite-undo-stack-observer.cpp index 85d7aed13..03e4796bd 100644 --- a/src/composite-undo-stack-observer.cpp +++ b/src/composite-undo-stack-observer.cpp @@ -79,6 +79,30 @@ CompositeUndoStackObserver::notifyUndoCommitEvent(Event* log) this->_unlock(); } +void +CompositeUndoStackObserver::notifyClearUndoEvent() +{ + this->_lock(); + for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) { + if (!i->to_remove) { + i->issueClearUndo(); + } + } + this->_unlock(); +} + +void +CompositeUndoStackObserver::notifyClearRedoEvent() +{ + this->_lock(); + for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) { + if (!i->to_remove) { + i->issueClearRedo(); + } + } + this->_unlock(); +} + bool CompositeUndoStackObserver::_remove_one(UndoObserverRecordList& list, UndoStackObserver& o) { |
