diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-07-27 22:29:47 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-07-27 22:29:47 +0000 |
| commit | 68616889b6eaf53f4e019f1566b7edf56e8ec521 (patch) | |
| tree | 22b84f4c28f56056022e0adafbab364ebbb1d719 /src/document-undo.cpp | |
| parent | powerstroke: sort point option (diff) | |
| download | inkscape-68616889b6eaf53f4e019f1566b7edf56e8ec521.tar.gz inkscape-68616889b6eaf53f4e019f1566b7edf56e8ec521.zip | |
Duplicate the undo key passed to sp_document_maybe_done, instead of simply
assigning it. Allows the function to be used with dynamically created
keys and fixes undo stack spam when adjusting filter parameter values
(LP #579932).
Fixed bugs:
- https://launchpad.net/bugs/579932
(bzr r9661)
Diffstat (limited to '')
| -rw-r--r-- | src/document-undo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/document-undo.cpp b/src/document-undo.cpp index ae1c82e71..62259fa19 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -198,7 +198,9 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int ev doc->priv->undoStackObservers.notifyUndoCommitEvent(event); } - doc->actionkey = key; + if (doc->actionkey) + g_free(doc->actionkey); + doc->actionkey = key ? g_strdup(key) : NULL; doc->virgin = FALSE; doc->setModifiedSinceSave(); |
