From e9e25c0f83f2bd149a63a11b0516b647e4082ed6 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Wed, 28 Mar 2018 19:27:59 +0200 Subject: Fix bug: 1758477 Rotate Duplicate/ Mirror Symmetry added functionality feature request https://bugs.launchpad.net/inkscape/+bug/1758477 --- src/object/sp-lpe-item.cpp | 10 ++++++++-- src/object/sp-path.cpp | 1 - src/object/sp-shape.cpp | 6 +----- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/object') diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp index 17b2710f8..abe08a1dc 100644 --- a/src/object/sp-lpe-item.cpp +++ b/src/object/sp-lpe-item.cpp @@ -358,8 +358,14 @@ sp_lpe_item_create_original_path_recursive(SPLPEItem *lpeitem) } else if (SPPath * path = dynamic_cast(lpeitem)) { Inkscape::XML::Node *pathrepr = path->getRepr(); if ( !pathrepr->attribute("inkscape:original-d") ) { - pathrepr->setAttribute("inkscape:original-d", pathrepr->attribute("d")); - path->setCurveBeforeLPE(path->getCurve()); + if (gchar const * value = pathrepr->attribute("d")) { + Geom::PathVector pv = sp_svg_read_pathv(value); + pathrepr->setAttribute("inkscape:original-d", value); + SPCurve * original = new SPCurve(); + original->set_pathvector(pv); + path->setCurveBeforeLPE(original); + original->unref(); + } } } else if (SPShape * shape = dynamic_cast(lpeitem)) { if (SPCurve * c_lpe = shape->getCurveBeforeLPE()) { diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp index 3c64c09b0..a4724a8e7 100644 --- a/src/object/sp-path.cpp +++ b/src/object/sp-path.cpp @@ -199,7 +199,6 @@ void SPPath::set(unsigned int key, const gchar* value) { } sp_lpe_item_update_patheffect(this, true, true); - this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_D: diff --git a/src/object/sp-shape.cpp b/src/object/sp-shape.cpp index 4af596d1e..df8a200d0 100644 --- a/src/object/sp-shape.cpp +++ b/src/object/sp-shape.cpp @@ -1068,7 +1068,7 @@ void SPShape::setCurveInsync(SPCurve *new_curve, unsigned int owner) /** * Return curve (if any exists) or NULL if there is no curve -* if owner == 0 return a copy + * if owner == 0 return a copy */ SPCurve * SPShape::getCurve(unsigned int owner) const { @@ -1084,8 +1084,6 @@ SPCurve * SPShape::getCurve(unsigned int owner) const /** * Return curve *before* LPE (if any exists) or NULL if there is no curve - * If force is set allow return curve_before_lpe even if not - * has path effect like in clips and mask * if owner == 0 return a copy */ SPCurve * SPShape::getCurveBeforeLPE(unsigned int owner) const @@ -1101,8 +1099,6 @@ SPCurve * SPShape::getCurveBeforeLPE(unsigned int owner) const /** * Return curve for edit - * If force is set allow return curve_before_lpe even if not - * has path effect like in clips and mask * if owner == 0 return a copy */ SPCurve * SPShape::getCurveForEdit(unsigned int owner) const -- cgit v1.2.3