From 29728afc0a65272f0415402b6391defbbf8a1f6e Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Wed, 4 Jun 2008 13:16:28 +0000 Subject: New 'spiro spline mode' in pen/pencil tool which automatically adds the spiro spline LPE to newly drawn paths (bzr r5800) --- src/draw-context.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/draw-context.cpp') diff --git a/src/draw-context.cpp b/src/draw-context.cpp index 0130f2378..6e919d81d 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -249,8 +249,17 @@ sp_draw_context_root_handler(SPEventContext *ec, GdkEvent *event) void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item) { - if (item && dc->waiting_LPE != Inkscape::LivePathEffect::INVALID_LPE) { - Inkscape::LivePathEffect::Effect::createAndApply(dc->waiting_LPE, dc->desktop->doc(), item); + using namespace Inkscape::LivePathEffect; + + // TODO: sort this out as soon as we use automatic LPE application for other things than spiro mode, too + if (item) { + if (prefs_get_int_attribute("tools.freehand", "spiro-spline-mode", 0)) { + Effect::createAndApply(SPIRO, dc->desktop->doc(), item); + return; + } + if (dc->waiting_LPE != INVALID_LPE) { + Effect::createAndApply(dc->waiting_LPE, dc->desktop->doc(), item); + } } } -- cgit v1.2.3