summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-14 19:13:17 +0000
committerjabiertxof <info@marker.es>2016-10-14 19:13:17 +0000
commit5cb63d6c6c49917f9277bb8a7a211f4a5b483c3f (patch)
treee219f1c07d2c7b67b88d3728f00245db2cebed66 /src
parentCode cleanup: simplify initial mesh color calculation. (diff)
downloadinkscape-5cb63d6c6c49917f9277bb8a7a211f4a5b483c3f.tar.gz
inkscape-5cb63d6c6c49917f9277bb8a7a211f4a5b483c3f.zip
Fix bug:1633521 on powerstroke
Fixed bugs: - https://launchpad.net/bugs/1633521 (bzr r15170)
Diffstat (limited to 'src')
-rw-r--r--src/sp-lpe-item.cpp11
1 files 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<Inkscape::LivePathEffect::LPEMeasureLine *>(lpeobj->get_lpe())) {
+ lpe->doOnRemove(this);
+ }
+ }
(*it)->unlink();
- delete (*it);
+ delete *it;
it = this->path_effect_list->erase(it);
}