summaryrefslogtreecommitdiffstats
path: root/src/sp-item-group.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-02 20:18:59 +0000
committerJabiertxof <jtx@jtx>2017-01-02 20:18:59 +0000
commitea0de461574893c3b21e4653d0185cec501e0efe (patch)
tree14f010634714b3f26ca1b75245c237bafe9e8e85 /src/sp-item-group.cpp
parentFixing paths (diff)
downloadinkscape-ea0de461574893c3b21e4653d0185cec501e0efe.tar.gz
inkscape-ea0de461574893c3b21e4653d0185cec501e0efe.zip
Remove clone original code
(bzr r15295.1.47)
Diffstat (limited to 'src/sp-item-group.cpp')
-rw-r--r--src/sp-item-group.cpp37
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();
}
}
}