diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-09-30 16:39:55 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-09-30 16:39:55 +0000 |
| commit | 0aba95762aa449668b044a894536ecb0a92b0316 (patch) | |
| tree | b43c7a6746cbb969901610b60c3f09d469a6fcbb | |
| parent | fix 1787601 star stroke width scaled by 3.78 (diff) | |
| download | inkscape-0aba95762aa449668b044a894536ecb0a92b0316.tar.gz inkscape-0aba95762aa449668b044a894536ecb0a92b0316.zip | |
Fix for bug:#1299461; Some LPE fails on apply to original, but cloned elements
| -rw-r--r-- | src/live_effects/lpegroupbbox.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 8 | ||||
| -rwxr-xr-x | src/object/sp-lpe-item.cpp | 9 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/live_effects/lpegroupbbox.cpp b/src/live_effects/lpegroupbbox.cpp index 6df6278b1..a87baf4b4 100644 --- a/src/live_effects/lpegroupbbox.cpp +++ b/src/live_effects/lpegroupbbox.cpp @@ -46,7 +46,9 @@ GroupBBoxEffect::clip_mask_bbox(SPLPEItem *item, Geom::Affine transform) std::vector<SPItem*> item_list = sp_item_group_item_list(group); for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) { SPLPEItem * subitem = dynamic_cast<SPLPEItem *>(*iter); - bbox.unionWith(clip_mask_bbox(subitem, affine)); + if (subitem) { + bbox.unionWith(clip_mask_bbox(subitem, affine)); + } } } return bbox; diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index af553a029..ce06627c9 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -99,6 +99,14 @@ PathParam::~PathParam() // } // } // } + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if (desktop) { + // TODO remove the tools_switch atrocity. + if (tools_isactive(desktop, TOOLS_NODES)) { + tools_switch(desktop, TOOLS_SELECT); + tools_switch(desktop, TOOLS_NODES); + } + } g_free(defvalue); } 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 <svg:path> 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); |
