summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-vector.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-12-14 10:05:39 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-12-14 10:05:39 +0000
commit91112f9d55017b82caa02a3c4673a8420a361801 (patch)
tree6f72e874054ed63bfbab5a2b9e1f34b56d842c53 /src/widgets/gradient-vector.cpp
parentextract_uri: fix, test, document (diff)
downloadinkscape-91112f9d55017b82caa02a3c4673a8420a361801.tar.gz
inkscape-91112f9d55017b82caa02a3c4673a8420a361801.zip
DocumentUndo::ScopedInsensitive
Diffstat (limited to 'src/widgets/gradient-vector.cpp')
-rw-r--r--src/widgets/gradient-vector.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 038835956..d1315f4c5 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -1095,10 +1095,8 @@ static void sp_gradient_vector_widget_load_gradient(GtkWidget *widget, SPGradien
// Once the user edits a gradient, it stops being auto-collectable
if (gradient->getRepr()->attribute("inkscape:collect")) {
SPDocument *document = gradient->document;
- bool saved = DocumentUndo::getUndoSensitive(document);
- DocumentUndo::setUndoSensitive(document, false);
+ DocumentUndo::ScopedInsensitive _no_undo(document);
gradient->getRepr()->setAttribute("inkscape:collect", nullptr);
- DocumentUndo::setUndoSensitive(document, saved);
}
} else { // no gradient, disable everything
gtk_widget_set_sensitive(widget, FALSE);