summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-09-12 18:04:46 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-09-12 18:04:46 +0000
commit3fd4da49524553f258416456db9b1daac499c1a8 (patch)
tree4af21e5134d08d00e6d0df2137db970edf751766 /src/sp-item.cpp
parentUpdated authors and translators in About box + sorted author names. (diff)
downloadinkscape-3fd4da49524553f258416456db9b1daac499c1a8.tar.gz
inkscape-3fd4da49524553f258416456db9b1daac499c1a8.zip
disconnect mask/ref connections when item is destroyed
(bzr r1699)
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 401af10b6..ff7857e6f 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -149,16 +149,14 @@ void SPItem::init() {
this->display = NULL;
this->clip_ref = new SPClipPathReference(this);
- {
- sigc::signal<void, SPObject *, SPObject *> cs1=this->clip_ref->changedSignal();
- sigc::slot2<void,SPObject*, SPObject *> sl1=sigc::bind(sigc::ptr_fun(clip_ref_changed), this);
- cs1.connect(sl1);
- }
+ sigc::signal<void, SPObject *, SPObject *> cs1=this->clip_ref->changedSignal();
+ sigc::slot2<void,SPObject*, SPObject *> sl1=sigc::bind(sigc::ptr_fun(clip_ref_changed), this);
+ _clip_ref_connection = cs1.connect(sl1);
this->mask_ref = new SPMaskReference(this);
sigc::signal<void, SPObject *, SPObject *> cs2=this->mask_ref->changedSignal();
sigc::slot2<void,SPObject*, SPObject *> sl2=sigc::bind(sigc::ptr_fun(mask_ref_changed), this);
- cs2.connect(sl2);
+ _mask_ref_connection = cs2.connect(sl2);
if (!this->style) this->style = sp_style_new_from_object(this);
@@ -402,6 +400,9 @@ sp_item_release(SPObject *object)
{
SPItem *item = (SPItem *) object;
+ item->_clip_ref_connection.disconnect();
+ item->_mask_ref_connection.disconnect();
+
if (item->clip_ref) {
item->clip_ref->detach();
delete item->clip_ref;