From: johanengelen Date: Wed, 6 Feb 2008 22:47:05 +0000 (+0000) Subject: Fix wrong identification of invalid effects (for unknown effects, it used to default... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2f83ab0ce3dfea04c88655e40339a029c1e54071;p=inkscape.git 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. --- 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;