summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-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
-rw-r--r--src/ui/tools/arc-tool.cpp5
-rw-r--r--src/ui/tools/spiral-tool.cpp8
-rw-r--r--src/ui/tools/star-tool.cpp2
6 files changed, 20 insertions, 12 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
diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp
index 34b29f3bb..c7243302b 100644
--- a/src/ui/tools/arc-tool.cpp
+++ b/src/ui/tools/arc-tool.cpp
@@ -424,7 +424,10 @@ void ArcTool::finishItem() {
desktop->canvas->endForcedFullRedraws();
desktop->getSelection()->set(this->arc);
-
+ if (this->arc->hasPathEffectRecursive()) {
+ this->arc->set_shape();
+ sp_lpe_item_update_patheffect (this->arc, true, false);
+ }
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_ARC, _("Create ellipse"));
this->arc = NULL;
diff --git a/src/ui/tools/spiral-tool.cpp b/src/ui/tools/spiral-tool.cpp
index 66779c3a1..ffca6ce4a 100644
--- a/src/ui/tools/spiral-tool.cpp
+++ b/src/ui/tools/spiral-tool.cpp
@@ -398,8 +398,12 @@ void SpiralTool::finishItem() {
this->desktop->canvas->endForcedFullRedraws();
this->desktop->getSelection()->set(this->spiral);
- this->desktop->getSelection()->set(this->spiral);
-
+
+ if (spiral->hasPathEffectRecursive()) {
+ this->spiral->set_shape();
+ sp_lpe_item_update_patheffect (this->spiral, true, false);
+ }
+
DocumentUndo::done(this->desktop->getDocument(), SP_VERB_CONTEXT_SPIRAL, _("Create spiral"));
this->spiral = NULL;
diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp
index 9712bb7bd..586b7df38 100644
--- a/src/ui/tools/star-tool.cpp
+++ b/src/ui/tools/star-tool.cpp
@@ -417,11 +417,11 @@ void StarTool::finishItem() {
this->star->set_shape();
this->star->updateRepr(SP_OBJECT_WRITE_EXT);
this->star->doWriteTransform(this->star->transform, NULL, true);
-
desktop->canvas->endForcedFullRedraws();
desktop->getSelection()->set(this->star);
if (this->star->hasPathEffectRecursive()) {
+ this->star->set_shape();
sp_lpe_item_update_patheffect (this->star, true, false);
}
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR,