summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-18 00:33:13 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-18 00:33:13 +0000
commitd2eab659b08ba4a28410ed2527ba0431832776b3 (patch)
tree05f5786b153121b010abb01713e0ffa364ac82f9 /src/live_effects
parentreimplement acceptsNumParams(); instead of making it a virtual function we ju... (diff)
downloadinkscape-d2eab659b08ba4a28410ed2527ba0431832776b3.tar.gz
inkscape-d2eab659b08ba4a28410ed2527ba0431832776b3.zip
Remove done_pathparam_set and friends because it currently isn't used any more anyway; reimplement its intended functionality by using isReady()
(bzr r6643)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/effect.cpp8
-rw-r--r--src/live_effects/effect.h11
2 files changed, 13 insertions, 6 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 1308a1860..7d01f63dd 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -251,11 +251,11 @@ Effect::createAndApply(EffectType type, SPDocument *doc, SPItem *item)
Effect::Effect(LivePathEffectObject *lpeobject)
: oncanvasedit_it(0),
is_visible(_("Is visible?"), _("If unchecked, the effect remains applied to the object but is temporarily disabled on canvas"), "is_visible", &wr, this, true),
- done_pathparam_set(false),
show_orig_path(false),
lpeobj(lpeobject),
concatenate_before_pwd2(false),
- provides_own_flash_paths(true) // is automatically set to false if providesOwnFlashPaths() is not overridden
+ provides_own_flash_paths(true), // is automatically set to false if providesOwnFlashPaths() is not overridden
+ is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden
{
registerParameter( dynamic_cast<Parameter *>(&is_visible) );
}
@@ -332,11 +332,11 @@ Effect::writeParamsToSVG() {
/**
* If the effect expects a path parameter (specified by a number of mouse clicks) before it is
* applied, this is the method that processes the resulting path. Override it to customize it for
- * your LPE. But don't forget to call the parent method so that done_pathparam_set is set to true!
+ * your LPE. But don't forget to call the parent method so that is_ready is set to true!
*/
void
Effect::acceptParamPath (SPPath */*param_path*/) {
- done_pathparam_set = true;
+ setReady();
}
/*
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index 1bc3988ab..e703c888b 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -113,7 +113,13 @@ public:
int acceptsNumParams() { return acceptsNumParams(effectType()); }
void doAcceptPathPreparations(SPLPEItem *lpeitem);
- inline bool pathParamAccepted() { return done_pathparam_set; }
+ /*
+ * isReady() indicates whether all preparations which are necessary to apply the LPE are done,
+ * e.g., waiting for a parameter path either before the effect is created or when it needs a
+ * path as argument. This is set in sp_lpe_item_add_path_effect().
+ */
+ inline bool isReady() { return is_ready; }
+ inline void setReady(bool ready = true) { is_ready = ready; }
virtual void doEffect (SPCurve * curve);
@@ -179,7 +185,6 @@ protected:
std::vector<std::pair<KnotHolderEntity*, const char*> > kh_entity_vector;
int oncanvasedit_it;
BoolParam is_visible;
- bool done_pathparam_set;
bool show_orig_path; // set this to true in derived effects to automatically have the original
// path displayed as helperpath
@@ -195,6 +200,8 @@ protected:
private:
bool provides_own_flash_paths; // if true, the standard flash path is suppressed
+ bool is_ready;
+
Effect(const Effect&);
Effect& operator=(const Effect&);
};