summaryrefslogtreecommitdiffstats
path: root/src/composite-undo-stack-observer.cpp
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-03-29 23:02:20 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-03-29 23:02:20 +0000
commitc905425451f756e070a2f0991892d397ba84ed24 (patch)
tree7b662fbe00e02f1cf398a99cfaa8c90c333827c0 /src/composite-undo-stack-observer.cpp
parentFix native path for iri (diff)
downloadinkscape-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 'src/composite-undo-stack-observer.cpp')
-rw-r--r--src/composite-undo-stack-observer.cpp24
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)
{