summaryrefslogtreecommitdiffstats
path: root/src/document-undo.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/document-undo.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/document-undo.cpp')
-rw-r--r--src/document-undo.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index 47d56ca66..f37b53f89 100644
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
@@ -201,7 +201,9 @@ void finish_incomplete_transaction(SPDocument &doc) {
g_warning ("Incomplete undo transaction:");
priv.partial = sp_repr_coalesce_log(priv.partial, log);
sp_repr_debug_print_log(priv.partial);
- priv.undo = g_slist_prepend(priv.undo, new Inkscape::Event(priv.partial));
+ Inkscape::Event *event = new Inkscape::Event(priv.partial);
+ priv.undo = g_slist_prepend(priv.undo, event);
+ priv.undoStackObservers.notifyUndoCommitEvent(event);
priv.partial = NULL;
}
}
@@ -303,6 +305,9 @@ sp_document_redo (SPDocument *doc)
void
sp_document_clear_undo (SPDocument *doc)
{
+ if (doc->priv->undo)
+ doc->priv->undoStackObservers.notifyClearUndoEvent();
+
while (doc->priv->undo) {
GSList *current;
@@ -318,6 +323,9 @@ sp_document_clear_undo (SPDocument *doc)
void
sp_document_clear_redo (SPDocument *doc)
{
+ if (doc->priv->redo)
+ doc->priv->undoStackObservers.notifyClearRedoEvent();
+
while (doc->priv->redo) {
GSList *current;