summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/document-subset.cpp13
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 28ebe1bed..66680310e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-01 Jon A. Cruz <jon@joncruz.org>
+
+ * src/document-subset.cpp:
+ Corrected two bugs, with the minor one hiding the more severe.
+
2006-05-06 MenTaLguY <mental@rydia.net>
* src/xml/repr-util.cpp, src/xml/repr.h:
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);