summaryrefslogtreecommitdiffstats
path: root/src/document-undo.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-01-19 21:18:27 +0000
committerMartin Owens <doctormo@gmail.com>2014-01-19 21:18:27 +0000
commit9f50a2b092e521634ceec0a9b06369d6a04708b2 (patch)
tree4fbb63aec1ce096e9a3380d22bb091d70bed704e /src/document-undo.cpp
parenti18n. No need to translate strings with one single space. (diff)
downloadinkscape-9f50a2b092e521634ceec0a9b06369d6a04708b2.tar.gz
inkscape-9f50a2b092e521634ceec0a9b06369d6a04708b2.zip
Allow undo methods to survive a non-sensitive call.
(bzr r12959)
Diffstat (limited to 'src/document-undo.cpp')
-rw-r--r--src/document-undo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index bad4d6c81..4a4156a70 100644
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
@@ -155,7 +155,7 @@ void Inkscape::DocumentUndo::maybeDone(SPDocument *doc, const gchar *key, const
{
g_assert (doc != NULL);
g_assert (doc->priv != NULL);
- g_assert (doc->priv->sensitive);
+ g_return_if_fail(doc->priv->sensitive);
if ( key && !*key ) {
g_warning("Blank undo key specified.");
}
@@ -204,7 +204,7 @@ void Inkscape::DocumentUndo::cancel(SPDocument *doc)
{
g_assert (doc != NULL);
g_assert (doc->priv != NULL);
- g_assert (doc->priv->sensitive);
+ g_return_if_fail(doc->priv->sensitive);
sp_repr_rollback (doc->rdoc);
@@ -287,7 +287,7 @@ gboolean Inkscape::DocumentUndo::redo(SPDocument *doc)
g_assert (doc != NULL);
g_assert (doc->priv != NULL);
- g_assert (doc->priv->sensitive);
+ g_return_val_if_fail(doc->priv->sensitive, FALSE);
doc->priv->sensitive = FALSE;
doc->priv->seeking = true;