Verify if the added record belong to the tree for issue1979

This commit is contained in:
Cédric Krier committed 2011-04-20 17:40:12 +02:00
1 parent f9f517f639
commit 6670ee7357
1 file changed
+6 -2
+6 -2
View File
@@ -35,7 +35,9 @@ class AdaptModelGroup(gtk.GenericTreeModel):
self.__removed = None # XXX dirty hack to allow update of has_child
def added(self, group, record):
if group is self.group:
if (group is self.group
and (record.group is self.group
or record.group.child_name == self.children_field)):
path = self.on_get_path(record)
iter_ = self.get_iter(path)
self.row_inserted(path, iter_)
@@ -51,7 +53,9 @@ class AdaptModelGroup(gtk.GenericTreeModel):
pass
def removed(self, group, record):
if group is self.group:
if (group is self.group
and (record.group is self.group
or record.group.child_name == self.children_field)):
path = self.on_get_path(record)
self.row_deleted(path)
if (record.parent and