From ce72482fe0e31786dbb2c6d3273cafe9b11f0800 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 11 Jun 2014 17:18:58 +0200 Subject: Fix for bug #1241902 (bzr r13418) --- src/sp-path.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index cbb61b0f6..4a68b82c7 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -310,6 +310,8 @@ g_message("sp_path_update_patheffect"); bool success = this->performPathEffect(curve); if (success && write) { + sp_lpe_item_apply_to_mask(this); + sp_lpe_item_apply_to_clippath(this); // could also do this->getRepr()->updateRepr(); but only the d attribute needs updating. #ifdef PATH_VERBOSE g_message("sp_path_update_patheffect writes 'd' attribute"); -- cgit v1.2.3 From 6829ce76e2ab77859c1a5fdacbb2fa71109d65b0 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Fri, 27 Jun 2014 18:28:46 +0200 Subject: Remove the incorrect fix for the bug 1241902 (bzr r13441) --- src/sp-path.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 4a68b82c7..cbb61b0f6 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -310,8 +310,6 @@ g_message("sp_path_update_patheffect"); bool success = this->performPathEffect(curve); if (success && write) { - sp_lpe_item_apply_to_mask(this); - sp_lpe_item_apply_to_clippath(this); // could also do this->getRepr()->updateRepr(); but only the d attribute needs updating. #ifdef PATH_VERBOSE g_message("sp_path_update_patheffect writes 'd' attribute"); -- cgit v1.2.3 From ae3b6608ecb46d6a71f6de95768aa0ed72e2dc08 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Mon, 28 Jul 2014 17:30:16 -0400 Subject: Don't update path effects on document load (#1299948) Fixed bugs: - https://launchpad.net/bugs/1299948 (bzr r13479) --- src/sp-path.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index cbb61b0f6..5bb7bf548 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -140,7 +140,21 @@ void SPPath::build(SPDocument *document, Inkscape::XML::Node *repr) { SPShape::build(document, repr); - this->readAttr( "inkscape:original-d" ); + // this->readAttr( "inkscape:original-d" ); // lp1299948 + if ((gchar const* s = this->getRepr()->attribute("inkscape:original-d"))) + { + // write it to XML, and to my curve, but don't update patheffects + Geom::PathVector pv = sp_svg_read_pathv(s); + SPCurve *curve = new SPCurve(pv); + + if (_curve_before_lpe) { + _curve_before_lpe = _curve_before_lpe->unref(); + } + + if (curve) { + _curve_before_lpe = curve->ref(); + } + } this->readAttr( "d" ); /* d is a required attribute */ @@ -314,7 +328,6 @@ g_message("sp_path_update_patheffect"); #ifdef PATH_VERBOSE g_message("sp_path_update_patheffect writes 'd' attribute"); #endif - if (_curve) { gchar *str = sp_svg_write_path(this->_curve->get_pathvector()); repr->setAttribute("d", str); -- cgit v1.2.3 From 03e8e4c2d075e2d6bfdf44c461b810b0e8b68456 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 28 Jul 2014 23:44:54 +0200 Subject: fix build. gcc 4.6.1 does not like double parens here :/ (bzr r13480) --- src/sp-path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 5bb7bf548..5c076b7cb 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -141,7 +141,7 @@ void SPPath::build(SPDocument *document, Inkscape::XML::Node *repr) { SPShape::build(document, repr); // this->readAttr( "inkscape:original-d" ); // lp1299948 - if ((gchar const* s = this->getRepr()->attribute("inkscape:original-d"))) + if (gchar const* s = this->getRepr()->attribute("inkscape:original-d")) { // write it to XML, and to my curve, but don't update patheffects Geom::PathVector pv = sp_svg_read_pathv(s); -- cgit v1.2.3