summaryrefslogtreecommitdiffstats
path: root/src/sp-path.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-05-10 20:44:06 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-05-10 20:44:06 +0000
commitef5f5f784221dbf04469b803c3bba265b0f93803 (patch)
tree2accaf8311b81456eecd6588fc4ff777da7eff9d /src/sp-path.cpp
parentStyle rewrite: 'text-decoration' requires access to style of ancestor element... (diff)
downloadinkscape-ef5f5f784221dbf04469b803c3bba265b0f93803.tar.gz
inkscape-ef5f5f784221dbf04469b803c3bba265b0f93803.zip
Tentative fix for LPEs and undo
Fixed bugs: - https://launchpad.net/bugs/1299948 (bzr r13341.1.5)
Diffstat (limited to 'src/sp-path.cpp')
-rw-r--r--src/sp-path.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index cbb61b0f6..d1fb850e1 100644
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
@@ -140,7 +140,22 @@ 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->getRepr()->setAttribute("inkscape:original-d", s);
+ }
this->readAttr( "d" );
/* d is a required attribute */
@@ -314,7 +329,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);