diff options
Diffstat (limited to 'src/eraser-context.cpp')
| -rw-r--r-- | src/eraser-context.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp index 00fb41004..cf6d8021d 100644 --- a/src/eraser-context.cpp +++ b/src/eraser-context.cpp @@ -101,6 +101,20 @@ static Geom::Point sp_eraser_get_npoint(SPEraserContext const *erc, Geom::Point static Geom::Point sp_eraser_get_vpoint(SPEraserContext const *erc, Geom::Point n); static void draw_temporary_box(SPEraserContext *dc); +#include "sp-factory.h" + +namespace { + SPEventContext* createEraserContext() { + return new SPEraserContext(); + } + + bool eraserContextRegistered = ToolFactory::instance().registerObject("/tools/eraser", createEraserContext); +} + +const std::string& CEraserContext::getPrefsPath() { + return SPEraserContext::prefsPath; +} + const std::string SPEraserContext::prefsPath = "/tools/eraser"; G_DEFINE_TYPE(SPEraserContext, sp_eraser_context, SP_TYPE_COMMON_CONTEXT); @@ -129,6 +143,7 @@ SPEraserContext::SPEraserContext() : SPCommonContext() { delete erc->ccommoncontext; erc->ccommoncontext = erc->cerasercontext; erc->ceventcontext = erc->cerasercontext; + types.insert(typeid(SPEraserContext)); erc->cursor_shape = cursor_eraser_xpm; erc->hot_x = 4; |
