summaryrefslogtreecommitdiffstats
path: root/src/live_effects
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/live_effects
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/live_effects')
-rw-r--r--src/live_effects/effect.cpp4
-rw-r--r--src/live_effects/lpe-powerstroke.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 7bfe6617a..03f482190 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -1113,7 +1113,7 @@ Effect::Effect(LivePathEffectObject *lpeobject)
current_shape(nullptr),
provides_own_flash_paths(true), // is automatically set to false if providesOwnFlashPaths() is not overridden
defaultsopen(false),
- is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden
+ is_ready(false)
{
registerParameter( dynamic_cast<Parameter *>(&is_visible) );
is_visible.widget_is_visible = false;
@@ -1261,12 +1261,12 @@ void Effect::doOnApply_impl(SPLPEItem const* lpeitem)
{
sp_lpe_item = const_cast<SPLPEItem *>(lpeitem);
doOnApply(lpeitem);
+ setReady();
}
void Effect::doBeforeEffect_impl(SPLPEItem const* lpeitem)
{
sp_lpe_item = const_cast<SPLPEItem *>(lpeitem);
- setReady();
doBeforeEffect(lpeitem);
update_helperpath();
}
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index 79d147a69..9ca4546f1 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -566,7 +566,7 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
Geom::PathVector path_out;
if (path_in.empty()) {
- return path_out;
+ return path_in;
}
Geom::PathVector pathv = pathv_to_linear_and_cubic_beziers(path_in);
Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2_in = pathv[0].toPwSb();
@@ -590,7 +590,7 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
std::vector<Geom::Point> ts_no_scale = offset_points.data();
if (ts_no_scale.empty()) {
- return path_out;
+ return path_in;
}
std::vector<Geom::Point> ts;
for (auto & tsp : ts_no_scale) {
@@ -753,6 +753,10 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
fixed_path.close(true);
path_out.push_back(fixed_path);
}
+ if (path_out.empty()) {
+ return path_in;
+ //doEffect_path (path_in);
+ }
return path_out;
}