diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-04-28 19:51:55 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-04-28 19:51:55 +0000 |
| commit | 8b26a533c4d17e09575abd9bef1e13bd6e6e23d1 (patch) | |
| tree | 8d4a4f83712f1a6e7ad28d14f6fb8d0f249109db /src | |
| parent | partial 2geom update. linearize the measure of the size of an ellipse (LP Bug... (diff) | |
| download | inkscape-8b26a533c4d17e09575abd9bef1e13bd6e6e23d1.tar.gz inkscape-8b26a533c4d17e09575abd9bef1e13bd6e6e23d1.zip | |
when removing LPE, with 'flattening' option, don't recalculate/rewrite ellipses (which would remove the LPE result). fixes bug introduced in rev. 12670)
Fixed bugs:
- https://launchpad.net/bugs/1309631
(bzr r13321)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-lpe-item.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index f59bc33ee..b5dd74fc6 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -442,6 +442,9 @@ void SPLPEItem::addPathEffect(LivePathEffectObject * new_lpeobj) g_free(hrefstr); } +/** + * If keep_path == true, the item should not be updated, effectively 'flattening' the LPE. + */ void SPLPEItem::removeCurrentPathEffect(bool keep_paths) { Inkscape::LivePathEffect::LPEObjectReference* lperef = this->getCurrentLPEReference(); @@ -456,27 +459,31 @@ void SPLPEItem::removeCurrentPathEffect(bool keep_paths) this->getRepr()->setAttribute("inkscape:path-effect", r.c_str()); } else { this->getRepr()->setAttribute("inkscape:path-effect", NULL); + } + + if (!keep_paths) { // Make sure that ellipse is stored as <svg:circle> or <svg:ellipse> if possible. if( SP_IS_GENERICELLIPSE(this)) { SP_GENERICELLIPSE(this)->write( this->getRepr()->document(), this->getRepr(), SP_OBJECT_WRITE_EXT ); } - } - if (!keep_paths) { sp_lpe_item_cleanup_original_path_recursive(this); } } +/** + * If keep_path == true, the item should not be updated, effectively 'flattening' the LPE. + */ void SPLPEItem::removeAllPathEffects(bool keep_paths) { this->getRepr()->setAttribute("inkscape:path-effect", NULL); - // Make sure that ellipse is stored as <svg:circle> or <svg:ellipse> if possible. - if( SP_IS_GENERICELLIPSE(this)) { - SP_GENERICELLIPSE(this)->write( this->getRepr()->document(), this->getRepr(), SP_OBJECT_WRITE_EXT ); - } - if (!keep_paths) { + // Make sure that ellipse is stored as <svg:circle> or <svg:ellipse> if possible. + if (SP_IS_GENERICELLIPSE(this)) { + SP_GENERICELLIPSE(this)->write(this->getRepr()->document(), this->getRepr(), SP_OBJECT_WRITE_EXT); + } + sp_lpe_item_cleanup_original_path_recursive(this); } } |
