From 8ceaac3136c654e3323680a4ccad290a2fa58722 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 31 Aug 2005 18:50:35 +0000 Subject: [PATCH] * src/PedView.py: force an update of the cached person * src/gramps_main.py: force an update of the cached person objects; thxumbnails are always png images svn: r5157 --- gramps2/ChangeLog | 4 +++- gramps2/src/PedView.py | 11 ++++++++--- gramps2/src/gramps_main.py | 3 ++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 939389c2b..f394cad5e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -2,6 +2,8 @@ * src/po/fi.po: Translation update for 2.0.7. 2005-08-31 Don Allingham + * src/PedView.py: force an update of the cached person + * src/gramps_main.py: force an update of the cached person * src/ReadGedcom.py: handle attributes if value is on the same line as the keyword @@ -47,7 +49,7 @@ 2005-08-29 Martin Hawlisch * src/plugins/NavWebPage.py: Correct link to Surname list page; Better handling for not existing media object files and note-only - objects; thumbnails are always png images + objects; thxumbnails are always png images * src/plugins/Check.py: Files of note-only objects are no longer reported as missing diff --git a/gramps2/src/PedView.py b/gramps2/src/PedView.py index bbfa01e76..be98bf7a0 100644 --- a/gramps2/src/PedView.py +++ b/gramps2/src/PedView.py @@ -197,6 +197,8 @@ class PedigreeView: self.active_person = None def person_updated_cb(self,handle_list): + if self.active_person and self.active_person.handle == handle_list[0]: + self.active_person = self.db.get_person_from_handle(handle_list[0]) self.load_canvas(self.active_person) def person_rebuild(self): @@ -220,7 +222,10 @@ class PedigreeView: as the root person of the tree.""" self.clear() - + + if person: + person = self.db.get_person_from_handle(person.handle) + if person is not self.active_person: self.active_person = person if person == None: @@ -237,7 +242,7 @@ class PedigreeView: font = gtk.gdk.font_from_description(style.font_desc) lst = [None]*31 - self.find_tree(self.active_person,0,1,lst) + self.find_tree(person,0,1,lst) # determine the largest string width and height for calcuation # of box sizes. @@ -280,7 +285,7 @@ class PedigreeView: anchor=gtk.ANCHOR_WEST) self.canvas_items.append(self.anchor_txt) - for family_handle in self.active_person.get_family_handle_list(): + for family_handle in person.get_family_handle_list(): family = self.db.get_family_from_handle(family_handle) if not family: continue diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 8dd827f9f..9139b9209 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -1224,7 +1224,8 @@ class Gramps(GrampsDBCallback.GrampsDBCallback): if page == PERSON_VIEW: self.people_view.apply_filter() elif page == PEDIGREE_VIEW: - self.pedigree_view.load_canvas(self.active_person) + person = self.db.get_person_from_handle(self.active_person.handle) + self.pedigree_view.load_canvas(person) def on_tools_clicked(self,obj): if self.active_person: