From 5cb63d6c6c49917f9277bb8a7a211f4a5b483c3f Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Fri, 14 Oct 2016 21:13:17 +0200 Subject: Fix bug:1633521 on powerstroke Fixed bugs: - https://launchpad.net/bugs/1633521 (bzr r15170) --- src/sp-lpe-item.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index c4247bd5a..f0b46a547 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -23,6 +23,7 @@ #include "live_effects/lpe-path_length.h" #include "live_effects/lpeobject.h" #include "live_effects/lpeobject-reference.h" +#include "live_effects/lpe-measure-line.h" #include "sp-path.h" #include "sp-item-group.h" @@ -122,10 +123,14 @@ void SPLPEItem::set(unsigned int key, gchar const* value) { while ( it != this->path_effect_list->end() ) { - LivePathEffectObject *lpeobj = (*it)->lpeobject; - lpeobj->get_lpe()->doOnRemove(this); + if (!value) { + LivePathEffectObject *lpeobj = (*it)->lpeobject; + if (Inkscape::LivePathEffect::LPEMeasureLine * lpe = dynamic_cast(lpeobj->get_lpe())) { + lpe->doOnRemove(this); + } + } (*it)->unlink(); - delete (*it); + delete *it; it = this->path_effect_list->erase(it); } -- cgit v1.2.3