From e91d79e807ad5072378745e3a2ce3f2cedbfc850 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 10 Mar 2018 00:37:22 +0100 Subject: Allow path move --- src/object/sp-ellipse.cpp | 7 ++++++- src/object/sp-shape.cpp | 4 +--- src/object/sp-shape.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/object') 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; -- cgit v1.2.3