summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a630e7)
raw | patch | inline | side by side (parent: 0a630e7)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 12 Sep 2006 18:04:46 +0000 (18:04 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 12 Sep 2006 18:04:46 +0000 (18:04 +0000) |
src/sp-item.cpp | patch | blob | history | |
src/sp-item.h | patch | blob | history |
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 401af10b64dd812748292b575bb37683e27a7fac..ff7857e6fb273172b168150bfd1600cd04db5dae 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
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);
{
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;
diff --git a/src/sp-item.h b/src/sp-item.h
index cb34817e53bed9dcfe52b323a62ace2a7b1fc8a9..43d2d8aa3f67685d15c07077dccf5c4a2e2a1e98 100644 (file)
--- a/src/sp-item.h
+++ b/src/sp-item.h
NR::Rect invokeBbox(NR::Matrix const &transform) const;
+ sigc::connection _clip_ref_connection;
+ sigc::connection _mask_ref_connection;
+
sigc::connection connectTransformed(sigc::slot<void, NR::Matrix const *, SPItem *> slot) {
return _transformed_signal.connect(slot);
}