summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-03-28 17:27:59 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-03-28 19:59:41 +0000
commite9e25c0f83f2bd149a63a11b0516b647e4082ed6 (patch)
tree450744f48b048724792f12b634de78ee6f1a0d34 /src/object
parenta bit more of warning cleanup (diff)
downloadinkscape-e9e25c0f83f2bd149a63a11b0516b647e4082ed6.tar.gz
inkscape-e9e25c0f83f2bd149a63a11b0516b647e4082ed6.zip
Fix bug: 1758477
Rotate Duplicate/ Mirror Symmetry added functionality feature request https://bugs.launchpad.net/inkscape/+bug/1758477
Diffstat (limited to 'src/object')
-rw-r--r--src/object/sp-lpe-item.cpp10
-rw-r--r--src/object/sp-path.cpp1
-rw-r--r--src/object/sp-shape.cpp6
3 files changed, 9 insertions, 8 deletions
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<SPPath *>(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<SPShape *>(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