diff options
| author | gustav_b <gustav_b@users.sourceforge.net> | 2007-03-29 23:02:20 +0000 |
|---|---|---|
| committer | gustav_b <gustav_b@users.sourceforge.net> | 2007-03-29 23:02:20 +0000 |
| commit | c905425451f756e070a2f0991892d397ba84ed24 (patch) | |
| tree | 7b662fbe00e02f1cf398a99cfaa8c90c333827c0 /src/composite-undo-stack-observer.cpp | |
| parent | Fix native path for iri (diff) | |
| download | inkscape-c905425451f756e070a2f0991892d397ba84ed24.tar.gz inkscape-c905425451f756e070a2f0991892d397ba84ed24.zip | |
Notify UndoStackObservers on commited incomplete transactions and sp_document_{undo,redo}_clear,
see #1684042.
(bzr r2780)
Diffstat (limited to '')
| -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) { |
