index 04890711ba461e9bca04a49eaa5e5330729dfb21..03e4796bd4526be23a3448d42f471d3dd8de3a88 100644 (file)
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <algorithm>
#include "composite-undo-stack-observer.h"
#include "xml/event.h"
}
void
-CompositeUndoStackObserver::notifyUndoEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyUndoEvent(Event* log)
{
this->_lock();
for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) {
}
void
-CompositeUndoStackObserver::notifyRedoEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyRedoEvent(Event* log)
{
this->_lock();
}
void
-CompositeUndoStackObserver::notifyUndoCommitEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyUndoCommitEvent(Event* log)
{
this->_lock();
for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) {
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)
{