diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-11-17 21:27:06 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-11-17 21:27:06 +0000 |
| commit | d2417aa8fb6f6945faccd0ba4a19337c509329b6 (patch) | |
| tree | b4747af84b3a45d2cde2fa278d4772fcfd2cfb75 /src/live_effects/lpe-bspline.cpp | |
| parent | Fixes crash with perspective_lpe (diff) | |
| download | inkscape-d2417aa8fb6f6945faccd0ba4a19337c509329b6.tar.gz inkscape-d2417aa8fb6f6945faccd0ba4a19337c509329b6.zip | |
fix a bug in bspline on apply on non shapes
(bzr r13726)
Diffstat (limited to 'src/live_effects/lpe-bspline.cpp')
| -rw-r--r-- | src/live_effects/lpe-bspline.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/live_effects/lpe-bspline.cpp b/src/live_effects/lpe-bspline.cpp index 97a4c6205..c5390a0c9 100644 --- a/src/live_effects/lpe-bspline.cpp +++ b/src/live_effects/lpe-bspline.cpp @@ -88,25 +88,12 @@ void LPEBSpline::doBeforeEffect (SPLPEItem const* /*lpeitem*/) } -void LPEBSpline::createAndApply(const char *name, SPDocument *doc, - SPItem *item) +void LPEBSpline::doOnApply(SPLPEItem const* lpeitem) { - if (!SP_IS_SHAPE(item)) { + if (!SP_IS_SHAPE(lpeitem)) { g_warning("LPE BSpline can only be applied to shapes (not groups)."); - } else { - // Path effect definition - Inkscape::XML::Document *xml_doc = doc->getReprDoc(); - Inkscape::XML::Node *repr = xml_doc->createElement("inkscape:path-effect"); - repr->setAttribute("effect", name); - - doc->getDefs()->getRepr() - ->addChild(repr, NULL); // adds to <defs> and assigns the 'id' attribute - const gchar *repr_id = repr->attribute("id"); - Inkscape::GC::release(repr); - - gchar *href = g_strdup_printf("#%s", repr_id); - SP_LPE_ITEM(item)->addPathEffect(href, true); - g_free(href); + SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem); + item->removeCurrentPathEffect(false); } } |
