summaryrefslogtreecommitdiffstats
path: root/src/draw-context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw-context.cpp')
-rw-r--r--src/draw-context.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 19551dd6a..6a9e63436 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -247,6 +247,14 @@ sp_draw_context_root_handler(SPEventContext *ec, GdkEvent *event)
return ret;
}
+static char const *
+tool_name(SPDrawContext *dc)
+{
+ return ( SP_IS_PEN_CONTEXT(dc)
+ ? "tools.freehand.pen"
+ : "tools.freehand.pencil" );
+}
+
static void
spdc_paste_curve_as_freehand_shape(const SPCurve *c, SPDrawContext *dc, SPItem *item)
{
@@ -270,7 +278,7 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item)
using namespace Inkscape::LivePathEffect;
if (item && SP_IS_LPE_ITEM(item)) {
- if (prefs_get_int_attribute("tools.freehand", "spiro-spline-mode", 0)) {
+ if (prefs_get_int_attribute(tool_name(dc), "spiro-spline-mode", 0)) {
Effect::createAndApply(SPIRO, dc->desktop->doc(), item);
}
@@ -572,14 +580,6 @@ spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed)
c->unref();
}
-static char const *
-tool_name(SPDrawContext *dc)
-{
- return ( SP_IS_PEN_CONTEXT(dc)
- ? "tools.freehand.pen"
- : "tools.freehand.pencil" );
-}
-
/*
* Flushes white curve(s) and additional curve into object
*