From 6a03015b016c177e0657fc6274a571db16e48b64 Mon Sep 17 00:00:00 2001 From: Stefano Facchini Date: Sat, 23 Sep 2017 10:02:16 +0200 Subject: Remove unused parameter in SPItem::doWriteTransform --- src/sp-item.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index b4642da5d..dd98ee1a4 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -1422,9 +1422,8 @@ Geom::Affine SPItem::set_transform(Geom::Affine const &transform) { return transform; } -void SPItem::doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &transform, Geom::Affine const *adv, bool compensate) +void SPItem::doWriteTransform(Geom::Affine const &transform, Geom::Affine const *adv, bool compensate) { - g_return_if_fail(repr != NULL); // calculate the relative transform, if not given by the adv attribute Geom::Affine advertized_transform; if (adv != NULL) { -- cgit v1.2.3 From c20891fabc8c3ee2251e0545878e06545b6f0cdd Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 1 Oct 2017 23:57:52 +0200 Subject: First batch --- src/sp-item.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index dd98ee1a4..a780f1a29 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -711,19 +711,18 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X // in the case of SP_OBJECT_WRITE_BUILD, the item should always be newly created, // so we need to add any children from the underlying object to the new repr if (flags & SP_OBJECT_WRITE_BUILD) { - GSList *l = NULL; + std::vectorl; for (auto& child: object->children) { if (dynamic_cast(&child) || dynamic_cast(&child)) { Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags); if (crepr) { - l = g_slist_prepend (l, crepr); + l.push_back(crepr); } } } - while (l) { - repr->addChild((Inkscape::XML::Node *) l->data, NULL); - Inkscape::GC::release((Inkscape::XML::Node *) l->data); - l = g_slist_remove (l, l->data); + for (auto i = l.rbegin(); i!= l.rend(); ++i) { + repr->addChild(*i, NULL); + Inkscape::GC::release(*i); } } else { for (auto& child: object->children) { -- cgit v1.2.3 From ee527cbb228c6fba9c83bba5058d1a68ac647060 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 14 Oct 2017 21:29:10 +0200 Subject: Fixing problems with nested LPE and convert to paths --- src/sp-item.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index a780f1a29..3fef28e5b 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -1406,9 +1406,11 @@ void SPItem::adjust_livepatheffect (Geom::Affine const &postmul, bool set) for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); ++it) { LivePathEffectObject *lpeobj = (*it)->lpeobject; - if (lpeobj && lpeobj->get_lpe()) { - Inkscape::LivePathEffect::Effect * effect = lpeobj->get_lpe(); - effect->transform_multiply(postmul, set); + if (lpeobj) { + Inkscape::LivePathEffect::Effect * lpe = lpeobj->get_lpe(); + if (lpe && lpe->isReady()) { + lpe->transform_multiply(postmul, set); + } } } } -- cgit v1.2.3