From 0aba95762aa449668b044a894536ecb0a92b0316 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 30 Sep 2018 18:39:55 +0200 Subject: Fix for bug:#1299461; Some LPE fails on apply to original, but cloned elements --- src/object/sp-lpe-item.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/object') diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp index fef2a299b..d543c5c4c 100755 --- a/src/object/sp-lpe-item.cpp +++ b/src/object/sp-lpe-item.cpp @@ -552,13 +552,11 @@ void SPLPEItem::addPathEffect(std::string value, bool reset) hreflist.push_back(value); // C++11: should be emplace_back std::move'd (also the reason why passed by value to addPathEffect) this->getRepr()->setAttribute("inkscape:path-effect", hreflist_svg_string(hreflist)); - // Make sure that ellipse is stored as if( SP_IS_GENERICELLIPSE(this)) { SP_GENERICELLIPSE(this)->write( this->getRepr()->document(), this->getRepr(), SP_OBJECT_WRITE_EXT ); } - // make sure there is an original-d for paths!!! - sp_lpe_item_create_original_path_recursive(this); + LivePathEffectObject *lpeobj = this->path_effect_list->back()->lpeobject; if (lpeobj && lpeobj->get_lpe()) { @@ -568,7 +566,10 @@ void SPLPEItem::addPathEffect(std::string value, bool reset) // has to be called when all the subitems have their lpes applied lpe->resetDefaults(this); } - + // Moved here to fix #1299461, we can call previious function twice after + // if anyone find necesary + // make sure there is an original-d for paths!!! + sp_lpe_item_create_original_path_recursive(this); // perform this once when the effect is applied lpe->doOnApply_impl(this); -- cgit v1.2.3