diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-24 00:37:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-24 00:37:00 +0000 |
| commit | ba053c48cdcd8b4995f188d80887d46c41f97b3d (patch) | |
| tree | 7095f1fb83aa1bf9ee14d633f73a35374136d88b /src/sp-item-group.cpp | |
| parent | Update to trunk (diff) | |
| download | inkscape-ba053c48cdcd8b4995f188d80887d46c41f97b3d.tar.gz inkscape-ba053c48cdcd8b4995f188d80887d46c41f97b3d.zip | |
Remove some code and make dependant of rotate copies
(bzr r15356.1.17)
Diffstat (limited to 'src/sp-item-group.cpp')
| -rw-r--r-- | src/sp-item-group.cpp | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 808d475c7..7b2507b5e 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -950,36 +950,25 @@ sp_group_perform_patheffect(SPGroup *group, SPGroup *topgroup, bool write) } else { c = subShape->getCurve(); } - bool success = false; + // only run LPEs when the shape has a curve defined if (c) { c->transform(i2anc_affine(subitem, topgroup)); - success = topgroup->performPathEffect(c, subShape); + topgroup->performPathEffect(c); c->transform(i2anc_affine(subitem, topgroup).inverse()); - if (c && success) { - subShape->setCurve(c, TRUE); - if (write) { - Inkscape::XML::Node *repr = subitem->getRepr(); - gchar *str = sp_svg_write_path(c->get_pathvector()); - repr->setAttribute("d", str); - #ifdef GROUP_VERBOSE - g_message("sp_group_perform_patheffect writes 'd' attribute"); - #endif - g_free(str); - } - c->unref(); - } else { - // LPE was unsuccesfull or doeffect stack return null. Read the old 'd'-attribute. + subShape->setCurve(c, TRUE); + + if (write) { Inkscape::XML::Node *repr = subitem->getRepr(); - if (gchar const * value = repr->attribute("d")) { - Geom::PathVector pv = sp_svg_read_pathv(value); - SPCurve *oldcurve = new (std::nothrow) SPCurve(pv); - if (oldcurve) { - subShape->setCurve(oldcurve, TRUE); - oldcurve->unref(); - } - } + gchar *str = sp_svg_write_path(c->get_pathvector()); + repr->setAttribute("d", str); +#ifdef GROUP_VERBOSE + g_message("sp_group_perform_patheffect writes 'd' attribute"); +#endif + g_free(str); } + + c->unref(); } } } |
