diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2006-05-08 08:46:21 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2006-05-08 08:46:21 +0000 |
| commit | 4a1c3a244096a32b79dad819ddb5cd05d5cd0dc7 (patch) | |
| tree | 5941e7db01f25567b65bf3240fafd22f1445bd5c /src/document-subset.cpp | |
| parent | another logo update from brisgeek (diff) | |
| download | inkscape-4a1c3a244096a32b79dad819ddb5cd05d5cd0dc7.tar.gz inkscape-4a1c3a244096a32b79dad819ddb5cd05d5cd0dc7.zip | |
Fixed a couple of bugs
(bzr r763)
Diffstat (limited to 'src/document-subset.cpp')
| -rw-r--r-- | src/document-subset.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/document-subset.cpp b/src/document-subset.cpp index ba6e416cd..217176f4e 100644 --- a/src/document-subset.cpp +++ b/src/document-subset.cpp @@ -170,6 +170,17 @@ private: } record.position_changed_connection.disconnect(); records.erase(obj); + + if ( record.parent == NULL ) { + Record &root = records[NULL]; + for ( Siblings::iterator it = root.children.begin(); it != root.children.end(); ++it ) { + if ( *it == obj ) { + root.children.erase( it ); + break; + } + } + } + removed_signal.emit(obj); sp_object_unref(obj); } @@ -202,7 +213,7 @@ DocumentSubset::DocumentSubset() void DocumentSubset::Relations::addOne(SPObject *obj) { g_return_if_fail( obj != NULL ); - g_return_if_fail( get(obj) != NULL ); + g_return_if_fail( get(obj) == NULL ); Record &record=_doAdd(obj); |
