summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-03-09 23:37:22 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-03-26 17:48:34 +0000
commite91d79e807ad5072378745e3a2ce3f2cedbfc850 (patch)
tree751c35fa9c8aeccc8cfb3734c4fd8a5f154ed6c6 /src
parentFixing refs (diff)
downloadinkscape-e91d79e807ad5072378745e3a2ce3f2cedbfc850.tar.gz
inkscape-e91d79e807ad5072378745e3a2ce3f2cedbfc850.zip
Allow path move
Diffstat (limited to 'src')
-rw-r--r--src/object/sp-ellipse.cpp7
-rw-r--r--src/object/sp-shape.cpp4
-rw-r--r--src/object/sp-shape.h2
-rw-r--r--src/ui/tool/path-manipulator.cpp3
4 files changed, 10 insertions, 6 deletions
diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp
index 6fc34bbb2..95bfd6160 100644
--- a/src/object/sp-ellipse.cpp
+++ b/src/object/sp-ellipse.cpp
@@ -481,7 +481,12 @@ void SPGenericEllipse::set_shape()
* This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/
SPCurve * before = this->getCurveBeforeLPE();
if (before || this->hasPathEffectRecursive()) {
- this->setCurveBeforeLPE(c);
+ if (!before || before->get_pathvector() != c->get_pathvector()){
+ this->setCurveBeforeLPE(c);
+ this->update_patheffect(false);
+ } else {
+ this->setCurveBeforeLPE(c);
+ }
} else {
this->setCurveInsync(c);
}
diff --git a/src/object/sp-shape.cpp b/src/object/sp-shape.cpp
index 48252a1d9..0ed5f731b 100644
--- a/src/object/sp-shape.cpp
+++ b/src/object/sp-shape.cpp
@@ -1033,7 +1033,7 @@ void SPShape::setCurve(SPCurve *new_curve, unsigned int owner)
* Sets _curve_before_lpe to refer to the curve.
*/
void
-SPShape::setCurveBeforeLPE(SPCurve *new_curve, unsigned int owner, bool write)
+SPShape::setCurveBeforeLPE(SPCurve *new_curve, unsigned int owner)
{
if (_curve_before_lpe) {
_curve_before_lpe = _curve_before_lpe->unref();
@@ -1046,8 +1046,6 @@ SPShape::setCurveBeforeLPE(SPCurve *new_curve, unsigned int owner, bool write)
_curve_before_lpe = new_curve->copy();
}
}
- sp_lpe_item_update_patheffect(this, true, write);
- requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
/**
diff --git a/src/object/sp-shape.h b/src/object/sp-shape.h
index 76d11d52c..be097e390 100644
--- a/src/object/sp-shape.h
+++ b/src/object/sp-shape.h
@@ -43,7 +43,7 @@ public:
SPCurve * getCurveBeforeLPE (unsigned int owner = FALSE) const;
SPCurve * getCurveForEdit (unsigned int owner = FALSE) const;
void setCurve (SPCurve *curve, unsigned int owner = TRUE);
- void setCurveBeforeLPE (SPCurve *new_curve, unsigned int owner = TRUE, bool write = FALSE);
+ void setCurveBeforeLPE (SPCurve *new_curve, unsigned int owner = TRUE);
void setCurveInsync (SPCurve *curve, unsigned int owner = TRUE);
int hasMarkers () const;
int numberOfMarkers (int type) const;
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 67d914095..192a02fe2 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1511,7 +1511,8 @@ void PathManipulator::_setGeometry()
if (empty()) return;
if (SPCurve * original = _path->getCurveBeforeLPE()){
if(!_spcurve->is_equal(original)) {
- _path->setCurveBeforeLPE(_spcurve, false, false);
+ _path->setCurveBeforeLPE(_spcurve, false);
+ sp_lpe_item_update_patheffect(_path, true, false);
original->unref();
}
} else if(!_spcurve->is_equal(_path->getCurve(true))) {