diff options
Diffstat (limited to 'src/live_effects/effect.cpp')
| -rw-r--r-- | src/live_effects/effect.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 8b690bc44..289d22172 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -70,7 +70,7 @@ namespace Inkscape { namespace LivePathEffect { -const Util::EnumData<EffectType> LPETypeData[INVALID_LPE] = { +const Util::EnumData<EffectType> LPETypeData[] = { // {constant defined in effect.h, N_("name of your effect"), "name of your effect in SVG"} {ANGLE_BISECTOR, N_("Angle bisector"), "angle_bisector"}, {BEND_PATH, N_("Bend"), "bend_path"}, @@ -101,7 +101,7 @@ const Util::EnumData<EffectType> LPETypeData[INVALID_LPE] = { {TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"}, {VONKOCH, N_("VonKoch"), "vonkoch"}, }; -const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, INVALID_LPE); +const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData)); Effect* Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) @@ -243,7 +243,7 @@ Effect::~Effect() Glib::ustring Effect::getName() { - if (lpeobj->effecttype_set && lpeobj->effecttype < INVALID_LPE) + if (lpeobj->effecttype_set && LPETypeConverter.is_valid_id(lpeobj->effecttype) ) return Glib::ustring( _(LPETypeConverter.get_label(lpeobj->effecttype).c_str()) ); else return Glib::ustring( _("No effect") ); |
