From 2f83ab0ce3dfea04c88655e40339a029c1e54071 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 6 Feb 2008 22:47:05 +0000 Subject: [PATCH] Fix wrong identification of invalid effects (for unknown effects, it used to default to Bend Path). Now it is reckognized as invalid effect, but still the effect is executed: meaning that "original-d" is copied to "d" instead of keeping "d" attrib. That still needs to be fixed. --- src/live_effects/lpeobject.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp index bcb01463a..e7810fc28 100644 --- a/src/live_effects/lpeobject.cpp +++ b/src/live_effects/lpeobject.cpp @@ -182,11 +182,9 @@ livepatheffect_set(SPObject *object, unsigned key, gchar const *value) lpeobj->lpe = NULL; } - if (value) { + if ( value && Inkscape::LivePathEffect::LPETypeConverter.is_valid_key(value) ) { lpeobj->effecttype = Inkscape::LivePathEffect::LPETypeConverter.get_id_from_key(value); - if (lpeobj->effecttype != Inkscape::LivePathEffect::INVALID_LPE) { - lpeobj->lpe = Inkscape::LivePathEffect::Effect::New(lpeobj->effecttype, lpeobj); - } + lpeobj->lpe = Inkscape::LivePathEffect::Effect::New(lpeobj->effecttype, lpeobj); lpeobj->effecttype_set = true; } else { lpeobj->effecttype = Inkscape::LivePathEffect::INVALID_LPE; -- 2.30.2