summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0bc4d63)
raw | patch | inline | side by side (parent: 0bc4d63)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Tue, 27 Jul 2010 22:29:47 +0000 (00:29 +0200) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Tue, 27 Jul 2010 22:29:47 +0000 (00:29 +0200) |
assigning it. Allows the function to be used with dynamically created
keys and fixes undo stack spam when adjusting filter parameter values
(LP #579932).
keys and fixes undo stack spam when adjusting filter parameter values
(LP #579932).
src/document-undo.cpp | patch | blob | history | |
src/document.cpp | patch | blob | history | |
src/document.h | patch | blob | history |
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index ae1c82e71f4e4d2e02b4ab2e6e480599ac26096f..62259fa1947f7c63fcf63c1d5cd0aa67b55482b7 100644 (file)
--- 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();
diff --git a/src/document.cpp b/src/document.cpp
index eff6d6e818b86f9db51ef9a8e3f087e820deb9bf..eebc50a98891c1cfeebdc2ec4a35cc57af13e781 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
inkscape_unref();
keepalive = FALSE;
}
-
+ if (actionkey) {
+ g_free(actionkey);
+ actionkey = NULL;
+ }
//delete this->_whiteboard_session_manager;
}
diff --git a/src/document.h b/src/document.h
index e70582006f92ac3d2327d69ab4a19284923b0c49..bcc072f70b0db7ea1113564a5e3ee9f906b9d3fc 100644 (file)
--- a/src/document.h
+++ b/src/document.h
SPDocumentPrivate *priv;
/// Last action key
- const gchar *actionkey;
+ gchar *actionkey;
/// Handler ID
guint modified_id;