diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-12-14 10:05:39 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-12-14 10:05:39 +0000 |
| commit | 91112f9d55017b82caa02a3c4673a8420a361801 (patch) | |
| tree | 6f72e874054ed63bfbab5a2b9e1f34b56d842c53 /src/widgets/toolbox.cpp | |
| parent | extract_uri: fix, test, document (diff) | |
| download | inkscape-91112f9d55017b82caa02a3c4673a8420a361801.tar.gz inkscape-91112f9d55017b82caa02a3c4673a8420a361801.zip | |
DocumentUndo::ScopedInsensitive
Diffstat (limited to 'src/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 0a7c4c79c..38ab84771 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -1136,8 +1136,7 @@ static void toggle_snap_callback(GtkToggleAction *act, gpointer data) //data poi return; } - bool saved = DocumentUndo::getUndoSensitive(doc); - DocumentUndo::setUndoSensitive(doc, false); + DocumentUndo::ScopedInsensitive _no_undo(doc); bool v = false; SPAttributeEnum attr = (SPAttributeEnum) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(act), "SP_ATTR_INKSCAPE")); @@ -1233,8 +1232,6 @@ static void toggle_snap_callback(GtkToggleAction *act, gpointer data) //data poi // The snapping preferences are stored in the document, and therefore toggling makes the document dirty doc->setModifiedSinceSave(); - - DocumentUndo::setUndoSensitive(doc, saved); } void setup_snap_toolbox(GtkWidget *toolbox, SPDesktop *desktop) |
