From 6e798635d78b138a1be87c2130dd82c02813d3dc Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 19 Jan 2004 23:07:10 +0000 Subject: [PATCH] * src/plugins/FilterEditor.py: handle unicode characters * src/PeopleStore.py: handle corrupt iter svn: r2663 --- gramps2/src/PeopleStore.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/gramps2/src/PeopleStore.py b/gramps2/src/PeopleStore.py index 5106c3cea..ee46e1bd6 100644 --- a/gramps2/src/PeopleStore.py +++ b/gramps2/src/PeopleStore.py @@ -196,18 +196,21 @@ class PeopleStore: self.model.clear() def remove(self,iter): - iter_parent = self.model.iter_parent (iter) - self.model.remove(iter) - if iter_parent and not self.model.iter_has_child (iter_parent): - name = unicode(self.model.get_value(iter_parent,0)) - self.model.remove (iter_parent) - if self.tree_roots.has_key(name): - del self.tree_roots[name] - if self.tree_open.has_key(name): - del self.tree_open[name] - if self.tree_list.has_key(name): - del self.tree_list[name] - self.count = self.count - 1 + try: + iter_parent = self.model.iter_parent (iter) + self.model.remove(iter) + if iter_parent and not self.model.iter_has_child (iter_parent): + name = unicode(self.model.get_value(iter_parent,0)) + self.model.remove (iter_parent) + if self.tree_roots.has_key(name): + del self.tree_roots[name] + if self.tree_open.has_key(name): + del self.tree_open[name] + if self.tree_list.has_key(name): + del self.tree_list[name] + self.count = self.count - 1 + except: + pass def get_row(self,iter): row = self.model.get_path(iter)