summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-07-20 19:02:23 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-07-20 19:02:23 +0000
commitb598f6ee0c07654733dd7ceecc3990cd5c6f50f3 (patch)
tree9beba81a4da5f8725ac73dc57e61284203c41396 /src/live_effects/effect.cpp
parentoptimize nodepath editing of lpe pathparam's a bit. (diff)
downloadinkscape-b598f6ee0c07654733dd7ceecc3990cd5c6f50f3.tar.gz
inkscape-b598f6ee0c07654733dd7ceecc3990cd5c6f50f3.zip
purge LivePathEffect::PathType
(bzr r6373)
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp9
1 files changed, 4 insertions, 5 deletions
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<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) {
- if ((*p)->paramType() == POINT_PARAM) {
- PointParam *pparam = static_cast<PointParam *>(*p);
+ if ( Inkscape::LivePathEffect::PointParam *pparam = dynamic_cast<Inkscape::LivePathEffect::PointParam*>(*p) ) {
KnotHolderEntity *e = dynamic_cast<KnotHolderEntity *>(*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<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) {
- if ((*p)->paramType() == Inkscape::LivePathEffect::PATH_PARAM) {
- SPCurve *c = new SPCurve(static_cast<Inkscape::LivePathEffect::PathParam*>(*p)->get_pathvector());
+ if ( Inkscape::LivePathEffect::PathParam *pathparam = dynamic_cast<Inkscape::LivePathEffect::PathParam*>(*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<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) {
- if ((*p)->paramType() == Inkscape::LivePathEffect::POINT_PARAM) {
+ if ( Inkscape::LivePathEffect::PointParam *pointparam = dynamic_cast<Inkscape::LivePathEffect::PointParam*>(*p) ) {
return true;
}
}