summaryrefslogtreecommitdiffstats
path: root/src/draw-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-04 13:16:28 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-04 13:16:28 +0000
commit29728afc0a65272f0415402b6391defbbf8a1f6e (patch)
tree12e9055f805f0b2dbfce2215a70f08a3ddaa5330 /src/draw-context.cpp
parentGroundwork to allow automatic application of an LPE to a newly drawn path (diff)
downloadinkscape-29728afc0a65272f0415402b6391defbbf8a1f6e.tar.gz
inkscape-29728afc0a65272f0415402b6391defbbf8a1f6e.zip
New 'spiro spline mode' in pen/pencil tool which automatically adds the spiro spline LPE to newly drawn paths
(bzr r5800)
Diffstat (limited to 'src/draw-context.cpp')
-rw-r--r--src/draw-context.cpp13
1 files changed, 11 insertions, 2 deletions
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);
+ }
}
}