diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-06 17:50:17 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-06 17:50:17 +0000 |
| commit | b1d8ece63b0bdfcc2595a97af9e69147c2d37a37 (patch) | |
| tree | 672d01cd146779e67916c4553a27134b20c2ba42 /src | |
| parent | add button to release measures (diff) | |
| download | inkscape-b1d8ece63b0bdfcc2595a97af9e69147c2d37a37.tar.gz inkscape-b1d8ece63b0bdfcc2595a97af9e69147c2d37a37.zip | |
Fix on delete line
(bzr r15017.1.41)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-lpe-item.cpp | 7 | ||||
| -rw-r--r-- | src/sp-object.cpp | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index d83593b31..936594679 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -73,6 +73,7 @@ void SPLPEItem::build(SPDocument *document, Inkscape::XML::Node *repr) { void SPLPEItem::release() { // disconnect all modified listeners: + for (std::list<sigc::connection>::iterator mod_it = this->lpe_modified_connection_list->begin(); mod_it != this->lpe_modified_connection_list->end(); ++mod_it) { @@ -83,7 +84,7 @@ void SPLPEItem::release() { this->lpe_modified_connection_list = NULL; PathEffectList::iterator it = this->path_effect_list->begin(); - + while ( it != this->path_effect_list->end() ) { // unlink and delete all references in the list (*it)->unlink(); @@ -121,8 +122,10 @@ 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); (*it)->unlink(); - delete *it; + delete (*it); it = this->path_effect_list->erase(it); } diff --git a/src/sp-object.cpp b/src/sp-object.cpp index da4367d5b..cbd7aa969 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -485,13 +485,16 @@ void SPObject::_sendDeleteSignalRecursive() { void SPObject::deleteObject(bool propagate, bool propagate_descendants) { sp_object_ref(this, NULL); + if ( SP_IS_LPE_ITEM(this) ) { + SP_LPE_ITEM(this)->removeAllPathEffects(false); + } if (propagate) { _delete_signal.emit(this); } if (propagate_descendants) { this->_sendDeleteSignalRecursive(); } - + Inkscape::XML::Node *repr = getRepr(); if (repr && repr->parent()) { sp_repr_unparent(repr); |
