diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-lpe-item.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index be886bdd2..1333642e9 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -555,19 +555,18 @@ void SPLPEItem::removeAllPathEffects(bool keep_paths) return; } } - for (PathEffectList::const_iterator it = path_effect_list->begin(); it != path_effect_list->end(); ++it) - { + while ( it != this->path_effect_list->end() ) { LivePathEffectObject *lpeobj = (*it)->lpeobject; if (lpeobj) { Inkscape::LivePathEffect::Effect * lpe = lpeobj->get_lpe(); lpe->keep_paths = keep_paths; lpe->doOnRemove(this); } + // unlink and delete all references in the list (*it)->unlink(); delete *it; it = this->path_effect_list->erase(it); } - this->getRepr()->setAttribute("inkscape:path-effect", NULL); if (!keep_paths) { |
