summaryrefslogtreecommitdiffstats
path: root/src/sp-spiral.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-05-29 00:09:29 +0000
committerJabiertxof <jtx@jtx>2017-05-29 00:09:29 +0000
commit822154dfcb9fe3777f32aa27b9bae4480a1417c2 (patch)
treec88082a30788888ff942b63e6c2cfadbf68ccf07 /src/sp-spiral.cpp
parentFix bug on crash if undefined LPE load (diff)
downloadinkscape-822154dfcb9fe3777f32aa27b9bae4480a1417c2.tar.gz
inkscape-822154dfcb9fe3777f32aa27b9bae4480a1417c2.zip
Fix bug #1694111 also fixes noumerous bugfixes on LPE undo. And shapes are improved to only perform path effet one time each
Fixed bugs: - https://launchpad.net/bugs/1694111 (bzr r15703.1.10)
Diffstat (limited to 'src/sp-spiral.cpp')
-rw-r--r--src/sp-spiral.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp
index 57eb918fe..d75db3daa 100644
--- a/src/sp-spiral.cpp
+++ b/src/sp-spiral.cpp
@@ -197,7 +197,7 @@ void SPSpiral::update(SPCtx *ctx, guint flags) {
}
void SPSpiral::update_patheffect(bool write) {
- this->set_shape();
+ this->set_shape(true);
if (write) {
Inkscape::XML::Node *repr = this->getRepr();
@@ -310,7 +310,7 @@ void SPSpiral::fitAndDraw(SPCurve* c, double dstep, Geom::Point darray[], Geom::
g_assert (is_unit_vector (hat2));
}
-void SPSpiral::set_shape() {
+void SPSpiral::set_shape(bool force) {
if (hasBrokenPathEffect()) {
g_warning ("The spiral shape has unknown LPE on it! Convert to path to make it editable preserving the appearance; editing it as spiral will remove the bad LPE");
@@ -365,6 +365,12 @@ void SPSpiral::set_shape() {
/* Reset the shape'scurve to the "original_curve"
* This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/
+ if(this->getCurveBeforeLPE()) {
+ if(!force && this->getCurveBeforeLPE()->get_pathvector() == c->get_pathvector()) {
+ c->unref();
+ return;
+ }
+ }
setCurveInsync( c, TRUE);
setCurveBeforeLPE( c );