summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6ab333)
raw | patch | inline | side by side (parent: e6ab333)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 6 Sep 2007 01:59:15 +0000 (01:59 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 6 Sep 2007 01:59:15 +0000 (01:59 +0000) |
src/sp-shape.cpp | patch | blob | history | |
src/sp-shape.h | patch | blob | history |
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index 76fd37af1a132a3190f7ec206a3a43ef2571f3bc..5c8e0922daa8d8c0164b7df629368bfa2242d3cf 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
{
shape->path_effect_href = NULL;
shape->path_effect_ref = new Inkscape::LivePathEffect::LPEObjectReference(SP_OBJECT(shape));
- shape->path_effect_ref->changedSignal().connect(sigc::bind(sigc::ptr_fun(lpeobject_ref_changed), shape));
+ new (&shape->lpe_modified_connection) sigc::connection();
for ( int i = 0 ; i < SP_MARKER_LOC_QTY ; i++ ) {
new (&shape->release_connect[i]) sigc::connection();
static void
sp_shape_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
+ SP_SHAPE(object)->path_effect_ref->changedSignal().connect(sigc::bind(sigc::ptr_fun(lpeobject_ref_changed), SP_SHAPE(object)));
+
sp_object_read_attr(object, "inkscape:path-effect");
if (((SPObjectClass *) (parent_class))->build) {
g_free(shape->path_effect_href);
}
shape->path_effect_ref->detach();
+
+ shape->lpe_modified_connection.disconnect();
+ shape->lpe_modified_connection.~connection();
if (((SPObjectClass *) parent_class)->release) {
((SPObjectClass *) parent_class)->release (object);
sp_shape_update_patheffect (SPShape *shape, bool write)
{
#ifdef SHAPE_VERBOSE
- g_message("sp_shape_update_patheffect");
+ g_message("sp_shape_update_patheffect: %p\n", shape);
#endif
g_return_if_fail (shape != NULL);
g_return_if_fail (SP_IS_SHAPE (shape));
}
if ( IS_LIVEPATHEFFECT(ref) && ref != shape )
{
- ref->connectModified(sigc::bind(sigc::ptr_fun(&lpeobject_ref_modified), shape));
+ shape->lpe_modified_connection.disconnect();
+ shape->lpe_modified_connection = ref->connectModified(sigc::bind(sigc::ptr_fun(&lpeobject_ref_modified), shape));
lpeobject_ref_modified(ref, 0, shape);
}
}
diff --git a/src/sp-shape.h b/src/sp-shape.h
index e8ec6d040f8577137dbc102268d848692ab94880..23dd8cd3892e7d7814235df51c03476282121739 100644 (file)
--- a/src/sp-shape.h
+++ b/src/sp-shape.h
gchar *path_effect_href;
Inkscape::LivePathEffect::LPEObjectReference *path_effect_ref;
+ sigc::connection lpe_modified_connection;
};
struct SPShapeClass {