summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-07-08 23:56:36 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-07-14 18:29:22 +0000
commitea1a5606368dd374ff9835c6a87f909b8fd56096 (patch)
tree33dfde7c9dfd2f21a593ce6bf56f5b47eaa521e9 /src/object
parentDocument how to update the extensions submodule (diff)
downloadinkscape-ea1a5606368dd374ff9835c6a87f909b8fd56096.tar.gz
inkscape-ea1a5606368dd374ff9835c6a87f909b8fd56096.zip
working on powerpencil in other thread
Diffstat (limited to 'src/object')
-rwxr-xr-xsrc/object/sp-lpe-item.cpp13
-rw-r--r--src/object/sp-lpe-item.h1
2 files changed, 6 insertions, 8 deletions
diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp
index 47ace710b..2e1e2c9f0 100755
--- a/src/object/sp-lpe-item.cpp
+++ b/src/object/sp-lpe-item.cpp
@@ -45,7 +45,6 @@
#include "sp-rect.h"
/* LPEItem base class */
-static void sp_lpe_item_enable_path_effects(SPLPEItem *lpeitem, bool enable);
static void lpeobject_ref_modified(SPObject *href, guint flags, SPLPEItem *lpeitem);
static void sp_lpe_item_create_original_path_recursive(SPLPEItem *lpeitem);
@@ -208,7 +207,7 @@ bool SPLPEItem::performPathEffect(SPCurve *curve, SPShape *current, bool is_clip
}
Inkscape::LivePathEffect::Effect *lpe = lpeobj->get_lpe();
- if (!performOnePathEffect(curve, current, lpe, is_clip_or_mask)) {
+ if (!lpe || !performOnePathEffect(curve, current, lpe, is_clip_or_mask)) {
return false;
}
if (path_effect_list_size != this->path_effect_list->size()) {
@@ -265,7 +264,9 @@ bool SPLPEItem::performOnePathEffect(SPCurve *curve, SPShape *current, Inkscape:
if (!SP_IS_GROUP(this)) {
// To have processed the shape to doAfterEffect
- lpe->pathvector_after_effect = curve->get_pathvector();
+ if (curve) {
+ lpe->pathvector_after_effect = curve->get_pathvector();
+ }
lpe->doAfterEffect(this);
}
}
@@ -569,9 +570,6 @@ void SPLPEItem::addPathEffect(std::string value, bool reset)
sp_lpe_item_create_original_path_recursive(this);
// perform this once when the effect is applied
lpe->doOnApply_impl(this);
-
- // indicate that all necessary preparations are done and the effect can be performed
- lpe->setReady();
}
//Enable the path effects now that everything is ready to apply the new path effect
@@ -1199,8 +1197,7 @@ bool SPLPEItem::forkPathEffectsIfNecessary(unsigned int nr_of_allowed_users, boo
}
// Enable or disable the path effects of the item.
-// The counter allows nested calls
-static void sp_lpe_item_enable_path_effects(SPLPEItem *lpeitem, bool enable)
+void sp_lpe_item_enable_path_effects(SPLPEItem *lpeitem, bool enable)
{
if (enable) {
lpeitem->path_effects_enabled++;
diff --git a/src/object/sp-lpe-item.h b/src/object/sp-lpe-item.h
index 6ebd01fe3..b055b5e97 100644
--- a/src/object/sp-lpe-item.h
+++ b/src/object/sp-lpe-item.h
@@ -104,6 +104,7 @@ public:
void editNextParamOncanvas(SPDesktop *dt);
};
void sp_lpe_item_update_patheffect (SPLPEItem *lpeitem, bool wholetree, bool write); // careful, class already has method with *very* similar name!
+void sp_lpe_item_enable_path_effects(SPLPEItem *lpeitem, bool enable);
#endif /* !SP_LPE_ITEM_H_SEEN */