X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcomposite-undo-stack-observer.cpp;h=03e4796bd4526be23a3448d42f471d3dd8de3a88;hb=f5c08cf9219d489de1885a47eaf709e97d31683a;hp=3c46cb11e1ef0a8cf8d9966db156f42cdc23a930;hpb=66b631fa5a41e5084641933e2f2c7eccf97fa536;p=inkscape.git diff --git a/src/composite-undo-stack-observer.cpp b/src/composite-undo-stack-observer.cpp index 3c46cb11e..03e4796bd 100644 --- a/src/composite-undo-stack-observer.cpp +++ b/src/composite-undo-stack-observer.cpp @@ -11,6 +11,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include #include "composite-undo-stack-observer.h" #include "xml/event.h" @@ -78,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) {