Code

Make pen/pencil shapes work in spiro mode, too
authorcilix42 <cilix42@users.sourceforge.net>
Fri, 4 Jul 2008 11:32:17 +0000 (11:32 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Fri, 4 Jul 2008 11:32:17 +0000 (11:32 +0000)
src/draw-context.cpp

index c946acabe3c9c49a5e5e408fe7acb3d3b26257a6..e8b755b9bc15b3abdee04546300a4f0814f5f9e0 100644 (file)
@@ -270,8 +270,11 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item)
     using namespace Inkscape::LivePathEffect;
 
     if (item) {
-        int shape = prefs_get_int_attribute("tools.freehand", "shape", 0);
+        if (prefs_get_int_attribute("tools.freehand", "spiro-spline-mode", 0)) {
+            Effect::createAndApply(SPIRO, dc->desktop->doc(), item);
+        }
 
+        int shape = prefs_get_int_attribute("tools.freehand", "shape", 0);
         bool shape_applied = false;
         SPCSSAttr *css_item = sp_css_attr_from_object (SP_OBJECT(item), SP_STYLE_FLAG_ALWAYS);
         const char *cstroke = sp_repr_css_property(css_item, "stroke", "none");
@@ -335,10 +338,6 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item)
             return;
         }
 
-        if (prefs_get_int_attribute("tools.freehand", "spiro-spline-mode", 0)) {
-            Effect::createAndApply(SPIRO, dc->desktop->doc(), item);
-            return;
-        }
         if (dc->waiting_LPE_type != INVALID_LPE) {
             Effect::createAndApply(dc->waiting_LPE_type, dc->desktop->doc(), item);
             dc->waiting_LPE_type = INVALID_LPE;