From 8b276652260976b9cd9eaef69f15245627a3c0ce Mon Sep 17 00:00:00 2001 From: joncruz Date: Sun, 27 Apr 2008 08:30:53 +0000 Subject: [PATCH] Fixed undo for eraser to be a single step --- src/eraser-context.cpp | 2 +- src/splivarot.cpp | 6 ++++++ src/splivarot.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp index f8748558d..3d142a9d0 100644 --- a/src/eraser-context.cpp +++ b/src/eraser-context.cpp @@ -837,7 +837,7 @@ set_to_accumulated(SPEraserContext *dc) selection->set(item); selection->add(dup); - sp_selected_path_diff(); + sp_selected_path_diff_skip_undo(); if ( !selection->isEmpty() ) { // If the item was not completely erased, add it back to the selection. GSList const *selected2 = g_slist_copy(const_cast(selection->itemList())); diff --git a/src/splivarot.cpp b/src/splivarot.cpp index b2da4e9f6..01331d2f8 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -89,6 +89,12 @@ sp_selected_path_diff() sp_selected_path_boolop(bool_op_diff, SP_VERB_SELECTION_DIFF, _("Difference")); } +void +sp_selected_path_diff_skip_undo() +{ + sp_selected_path_boolop(bool_op_diff, SP_VERB_NONE, _("Difference")); +} + void sp_selected_path_symdiff() { diff --git a/src/splivarot.h b/src/splivarot.h index 61b5ee143..2ac47135a 100644 --- a/src/splivarot.h +++ b/src/splivarot.h @@ -16,6 +16,7 @@ void sp_selected_path_union (); void sp_selected_path_union_skip_undo (); void sp_selected_path_intersect (); void sp_selected_path_diff (); +void sp_selected_path_diff_skip_undo (); void sp_selected_path_symdiff (); void sp_selected_path_cut (); void sp_selected_path_slice (); -- 2.30.2