From ea1a5606368dd374ff9835c6a87f909b8fd56096 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Tue, 9 Jul 2019 01:56:36 +0200 Subject: working on powerpencil in other thread --- src/live_effects/effect.cpp | 4 ++-- src/live_effects/lpe-powerstroke.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/live_effects') 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(&is_visible) ); is_visible.widget_is_visible = false; @@ -1261,12 +1261,12 @@ void Effect::doOnApply_impl(SPLPEItem const* lpeitem) { sp_lpe_item = const_cast(lpeitem); doOnApply(lpeitem); + setReady(); } void Effect::doBeforeEffect_impl(SPLPEItem const* lpeitem) { sp_lpe_item = const_cast(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 > pwd2_in = pathv[0].toPwSb(); @@ -590,7 +590,7 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in) std::vector ts_no_scale = offset_points.data(); if (ts_no_scale.empty()) { - return path_out; + return path_in; } std::vector 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; } -- cgit v1.2.3