Code

Remove superfluous FreehandShape LPE
authorcilix42 <cilix42@users.sourceforge.net>
Thu, 19 Feb 2009 22:37:11 +0000 (22:37 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Thu, 19 Feb 2009 22:37:11 +0000 (22:37 +0000)
src/draw-context.cpp
src/live_effects/effect.cpp
src/live_effects/lpe-patternalongpath.cpp
src/live_effects/lpe-patternalongpath.h

index 5e3ff82dc4539154b6379478f8c0e370297d4db0..a8d6187f6917908e747b7e87f28afa75cdfc361f 100644 (file)
@@ -278,7 +278,7 @@ spdc_paste_curve_as_freehand_shape(const SPCurve *c, SPDrawContext *dc, SPItem *
 
     // TODO: Don't paste path if nothing is on the clipboard
 
-    Effect::createAndApply(Inkscape::LivePathEffect::FREEHAND_SHAPE, dc->desktop->doc(), item);
+    Effect::createAndApply(PATTERN_ALONG_PATH, dc->desktop->doc(), item);
     Effect* lpe = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item));
     gchar *svgd = sp_svg_write_path(c->get_pathvector());
     static_cast<LPEPatternAlongPath*>(lpe)->pattern.paste_param_path(svgd);
@@ -391,7 +391,7 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item)
 
             if (SP_IS_LPETOOL_CONTEXT(dc)) {
                 // since a geometric LPE was applied, we switch back to "inactive" mode
-                lpetool_context_switch_mode(SP_LPETOOL_CONTEXT(dc), Inkscape::LivePathEffect::INVALID_LPE);
+                lpetool_context_switch_mode(SP_LPETOOL_CONTEXT(dc), INVALID_LPE);
             }
         }
         if (SP_IS_PEN_CONTEXT(dc)) {
index e4a5b9b4311557ac51a01f33d38d12a8e65b8ce9..9a1c33eeb0462a56a1539d181e707b232725ff82 100644 (file)
@@ -112,7 +112,6 @@ const Util::EnumData<EffectType> LPETypeData[] = {
     {PATTERN_ALONG_PATH,    N_("Pattern Along Path"),      "skeletal"},   // for historic reasons, this effect is called skeletal(strokes) in Inkscape:SVG
     {CURVE_STITCH,          N_("Stitch Sub-Paths"),        "curvestitching"},
 /* 0.47 */
-    {FREEHAND_SHAPE,        N_("Freehand Shape"),          "freehand_shape"}, // this is actually a special type of PatternAlongPath, used to paste shapes in pen/pencil tool
     {KNOT,                  N_("Knot"),                    "knot"},
     {CONSTRUCT_GRID,        N_("Construct grid"),          "construct_grid"},
     {SPIRO,                 N_("Spiro spline"),            "spiro"},
@@ -140,9 +139,6 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
         case PATTERN_ALONG_PATH:
             neweffect = static_cast<Effect*> ( new LPEPatternAlongPath(lpeobj) );
             break;
-        case FREEHAND_SHAPE:
-            neweffect = static_cast<Effect*> ( new LPEFreehandShape(lpeobj) );
-            break;
         case BEND_PATH:
             neweffect = static_cast<Effect*> ( new LPEBendPath(lpeobj) );
             break;
index 52bc42cb0b128438ee3c76828403154cef4a1676..6ba680c1599aaef8f116bae91dd10f513296271e 100644 (file)
@@ -214,10 +214,6 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
     }
 }
 
-LPEFreehandShape::LPEFreehandShape(LivePathEffectObject *lpeobject) : LPEPatternAlongPath(lpeobject)
-{
-}
-
 } // namespace LivePathEffect
 } /* namespace Inkscape */
 
index f35f7a5cb5db5899df85ec5b0f4df4650c3581c9..ea89097b30ffad8698c23a0dffa9dddcc9b720f3 100644 (file)
@@ -50,12 +50,6 @@ private:
     LPEPatternAlongPath& operator=(const LPEPatternAlongPath&);
 };
 
-class LPEFreehandShape : public LPEPatternAlongPath {
-public:
-  LPEFreehandShape(LivePathEffectObject *lpeobject);
-  virtual ~LPEFreehandShape() {}
-};
-
 }; //namespace LivePathEffect
 }; //namespace Inkscape