From: mental Date: Sun, 5 Mar 2006 22:04:56 +0000 (+0000) Subject: Wire up new SPObject signal to DocumentSubset, so object order changes will be reflec... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=995ef36b2f4a73356bc05e380e05f1a66c8b2c8a;p=inkscape.git Wire up new SPObject signal to DocumentSubset, so object order changes will be reflected in the subset --- diff --git a/ChangeLog b/ChangeLog index 8edea42d5..9e48bfb33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-03-05 MenTaLguY + + * src/document-subset.cpp: + + Wire up new SPObject signal to DocumentSubset, so order changes + will be reflected in the subset. + 2006-03-05 MenTaLguY * src/sp-object.h, src/sp-object.cpp: diff --git a/src/document-subset.cpp b/src/document-subset.cpp index 08638b9f3..d156b045b 100644 --- a/src/document-subset.cpp +++ b/src/document-subset.cpp @@ -15,6 +15,7 @@ #include #include +#include #include "util/list.h" #include "util/reverse-list.h" @@ -36,6 +37,7 @@ struct DocumentSubset::Relations : public GC::Managed, Siblings children; gulong release_connection; + sigc::connection position_changed_connection; Record() : parent(NULL), release_connection(0) {} @@ -148,6 +150,10 @@ private: record.release_connection = g_signal_connect(obj, "release", (GCallback)&Relations::_release_object, this); + record.position_changed_connection + = obj->connectPositionChanged( + sigc::mem_fun(this, &Relations::reorder) + ); return record; } @@ -161,6 +167,7 @@ private: g_signal_handler_disconnect(obj, record.release_connection); record.release_connection = 0; } + record.position_changed_connection.disconnect(); records.erase(obj); removed_signal.emit(obj); sp_object_unref(obj);