From b598f6ee0c07654733dd7ceecc3990cd5c6f50f3 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 20 Jul 2008 19:02:23 +0000 Subject: purge LivePathEffect::PathType (bzr r6373) --- src/live_effects/effect.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index ad9024772..85f392321 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -431,8 +431,7 @@ void Effect::addPointParamHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { using namespace Inkscape::LivePathEffect; for (std::vector::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { - if ((*p)->paramType() == POINT_PARAM) { - PointParam *pparam = static_cast(*p); + if ( Inkscape::LivePathEffect::PointParam *pparam = dynamic_cast(*p) ) { KnotHolderEntity *e = dynamic_cast(*p); e->create(desktop, item, knotholder, pparam->handleTip(), pparam->knotShape(), pparam->knotMode(), pparam->knotColor()); @@ -457,8 +456,8 @@ Effect::addHelperPaths(SPLPEItem *lpeitem, SPDesktop *desktop) } for (std::vector::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { - if ((*p)->paramType() == Inkscape::LivePathEffect::PATH_PARAM) { - SPCurve *c = new SPCurve(static_cast(*p)->get_pathvector()); + if ( Inkscape::LivePathEffect::PathParam *pathparam = dynamic_cast(*p) ) { + SPCurve *c = new SPCurve(pathparam->get_pathvector()); // TODO: factor this out (also the copied code above); see also lpe-lattice.cpp SPCanvasItem *canvasitem = sp_nodepath_generate_helperpath(desktop, c, SP_ITEM(lpeitem), 0x009000ff); @@ -617,7 +616,7 @@ Effect::providesKnotholder() // otherwise: are there any PointParams? for (std::vector::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { - if ((*p)->paramType() == Inkscape::LivePathEffect::POINT_PARAM) { + if ( Inkscape::LivePathEffect::PointParam *pointparam = dynamic_cast(*p) ) { return true; } } -- cgit v1.2.3