From 91112f9d55017b82caa02a3c4673a8420a361801 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Fri, 14 Dec 2018 10:05:39 +0000 Subject: DocumentUndo::ScopedInsensitive --- src/conn-avoid-ref.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/conn-avoid-ref.cpp') diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 087bd93fa..32d564fe6 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -364,8 +364,7 @@ void init_avoided_shape_geometry(SPDesktop *desktop) // Don't count this as changes to the document, // it is basically just late initialisation. SPDocument *document = desktop->getDocument(); - bool saved = DocumentUndo::getUndoSensitive(document); - DocumentUndo::setUndoSensitive(document, false); + DocumentUndo::ScopedInsensitive _no_undo(document); bool initialised = false; std::vector tmp; @@ -376,8 +375,6 @@ void init_avoided_shape_geometry(SPDesktop *desktop) SPItem *item = *iter; item->avoidRef->handleSettingChange(); } - - DocumentUndo::setUndoSensitive(document, saved); } -- cgit v1.2.3