From 2ea23425af0d0aac443b9b465789971c05caa0d3 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 26 Apr 2008 09:07:28 +0000 Subject: Initial cut of eraser tool (bzr r5524) --- src/tools-switch.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 11e3ff5b4..e32d8d13d 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -40,6 +40,7 @@ #include "spiral-context.h" #include "sp-spiral.h" #include "dyna-draw-context.h" +#include "eraser-context.h" #include "pen-context.h" #include "pencil-context.h" #include "text-context.h" @@ -74,6 +75,7 @@ static char const *const tool_names[] = { "tools.dropper", "tools.connector", "tools.paintbucket", + "tools.eraser", NULL }; @@ -96,6 +98,7 @@ static char const *const tool_ids[] = { "dropper", "connector", "paintbucket", + "eraser", NULL }; @@ -237,6 +240,12 @@ tools_switch(SPDesktop *dt, int num) inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting.")); break; + case TOOLS_ERASER: + dt->set_event_context(SP_TYPE_ERASER_CONTEXT, tool_names[num]); + dt->activate_guides(false); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to erase.")); + break; } } -- cgit v1.2.3