diff options
| author | MenTaLguY <mental@rydia.net> | 2006-03-05 22:04:56 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-03-05 22:04:56 +0000 |
| commit | 7f2f61b91a68e96c15973e92cc0a96016304efd4 (patch) | |
| tree | b08001b8a9fdb417566229293d39c19120a92231 /src/document-subset.cpp | |
| parent | Add signal for notification of object position changes (diff) | |
| download | inkscape-7f2f61b91a68e96c15973e92cc0a96016304efd4.tar.gz inkscape-7f2f61b91a68e96c15973e92cc0a96016304efd4.zip | |
Wire up new SPObject signal to DocumentSubset, so object order changes will be reflected in the subset
(bzr r207)
Diffstat (limited to 'src/document-subset.cpp')
| -rw-r--r-- | src/document-subset.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <glib/gmessages.h> #include <sigc++/signal.h> +#include <sigc++/functors/mem_fun.h> #include "util/list.h" #include "util/reverse-list.h" @@ -36,6 +37,7 @@ struct DocumentSubset::Relations : public GC::Managed<GC::ATOMIC>, 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); |
