summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f006bd)
raw | patch | inline | side by side (parent: 1f006bd)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sun, 18 May 2008 21:02:43 +0000 (21:02 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sun, 18 May 2008 21:02:43 +0000 (21:02 +0000) |
src/live_effects/effect.cpp | patch | blob | history | |
src/live_effects/effect.h | patch | blob | history | |
src/sp-lpe-item.cpp | patch | blob | history |
index 9f74af3d9633ed1a37bb2c0405b2d3cb908a2fd8..1d448141590b4fa3d2bc715559986854aff53d93 100644 (file)
return lpeobj->effecttype;
}
+void
+Effect::doOnApply (SPLPEItem */*lpeitem*/)
+{
+ // This is performed once when the effect is freshly applied to a path
+}
+
void
Effect::doBeforeEffect (SPLPEItem */*lpeitem*/)
{
index 496d4cbdfa1b327c487fc516e53634d7725c2a7e..b5c1d6aeb2dd6bb80992aede8105ce3479dfca28 100644 (file)
EffectType effectType ();
+ virtual void doOnApply (SPLPEItem *lpeitem);
+
virtual void doBeforeEffect (SPLPEItem *lpeitem);
virtual void doEffect (SPCurve * curve);
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index b6a63e9b92ef53fb094a22188e0f5b05e2a7d416..87e737435ead7e1fcec0e6a8acbbf6adf0e8aa59 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -362,11 +362,15 @@ void sp_lpe_item_set_path_effect(SPLPEItem *lpeitem, gchar *value, bool reset)
SP_OBJECT_REPR(lpeitem)->setAttribute("inkscape:path-effect", value);
// Ask the path effect to reset itself if it doesn't have parameters yet
- if (lpeitem->path_effect_ref && reset) {
+ if (lpeitem->path_effect_ref) {
LivePathEffectObject *lpeobj = lpeitem->path_effect_ref->lpeobject;
if (lpeobj && lpeobj->lpe) {
- // has to be called when all the subitems have their lpes applied
- lpeobj->lpe->resetDefaults(lpeitem);
+ if(reset) {
+ // has to be called when all the subitems have their lpes applied
+ lpeobj->lpe->resetDefaults(lpeitem);
+ }
+ // perform this once when the effect is applied
+ lpeobj->lpe->doOnApply(SP_LPE_ITEM(lpeitem));
}
}