From 097aef7956ceccc8f64b54af9766c488bdb40c29 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 30 Apr 2006 23:26:38 +0000 Subject: [PATCH] 2006-04-30 Don Allingham * src/DataViews.py/_PersonView.py: don't add handles of top level objects * src/GrampsWidgets.py: handle both types and tuples svn: r6502 --- gramps2/ChangeLog | 5 +++++ gramps2/src/DataViews/_PersonView.py | 3 ++- gramps2/src/GrampsWidgets.py | 7 +++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8c646e515..0b7f2be56 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2006-04-30 Don Allingham + * src/DataViews.py/_PersonView.py: don't add handles of top level + objects + * src/GrampsWidgets.py: handle both types and tuples + 2006-04-30 Brian Matherly * src/plugins/CountAncestors.py: Use positive numbers for generations to be consistent with the rest of GRAMPS diff --git a/gramps2/src/DataViews/_PersonView.py b/gramps2/src/DataViews/_PersonView.py index 0006e79fe..4bf937fd6 100644 --- a/gramps2/src/DataViews/_PersonView.py +++ b/gramps2/src/DataViews/_PersonView.py @@ -638,7 +638,8 @@ class PersonView(PageView.PersonNavView): for path in paths: node = self.model.on_get_iter(path) handle = self.model.on_get_value(node, PeopleModel.COLUMN_INT_ID) - mlist.append(handle) + if handle: + mlist.append(handle) return mlist def remove_from_person_list(self,person): diff --git a/gramps2/src/GrampsWidgets.py b/gramps2/src/GrampsWidgets.py index 7eb6bae1a..b9f8a540a 100644 --- a/gramps2/src/GrampsWidgets.py +++ b/gramps2/src/GrampsWidgets.py @@ -384,8 +384,11 @@ class MonitoredDataType: return (value[0],'') def update(self): - if self.get_val(): - self.sel.set_values(self.get_val()) + val = self.get_val() + if type(val) == tuple : + self.sel.set_values(val) + else: + self.sel.set_values((int(val),str(val))) def on_change(self, obj): value = self.fix_value(self.sel.get_values())