From be923e94078b31bbfc65633aebe201b2698370f8 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Tue, 30 Oct 2001 06:44:03 +0000 Subject: [PATCH] When adding a birth or death event, the place was getting entered twice; once when closing the 'Event Edit' dialog, and then again when closing the 'Edit Person' dialog. Updating the birth and death combo boxes after closing the 'Event Edit' window solves this problem, and also makes new places show up immediately in their lists. svn: r524 --- gramps/src/EditPerson.py | 9 ++++----- gramps/src/utils.py | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py index 7c95cdb32..89e69c231 100644 --- a/gramps/src/EditPerson.py +++ b/gramps/src/EditPerson.py @@ -204,11 +204,6 @@ class EditPerson: self.attr_list.set_column_visibility(2,Config.show_detail) self.addr_list.set_column_visibility(2,Config.show_detail) - plist = self.db.getPlaceMap().values() - if len(plist) > 0: - utils.attach_places(plist,self.dpcombo,self.death.getPlace()) - utils.attach_places(plist,self.bpcombo,self.birth.getPlace()) - if Config.display_attr: self.get_widget("user_label").set_text(Config.attr_name) val = "" @@ -285,6 +280,10 @@ class EditPerson: def redraw_event_list(self): """redraws the event list for the person""" utils.redraw_list(self.elist,self.event_list,disp_event) + plist = self.db.getPlaceMap().values() + if len(plist) > 0: + utils.attach_places(plist,self.dpcombo,self.death.getPlace()) + utils.attach_places(plist,self.bpcombo,self.birth.getPlace()) self.bplace.set_text(self.birth.getPlaceName()) self.dplace.set_text(self.death.getPlaceName()) self.bdate.set_text(self.birth.getDate()) diff --git a/gramps/src/utils.py b/gramps/src/utils.py index 6e59c1e22..5c0bf7774 100644 --- a/gramps/src/utils.py +++ b/gramps/src/utils.py @@ -331,6 +331,7 @@ def attach_places(values,combo,place): sel_child = c mymap[src] = c + combo.list.clear_items(0,-1) combo.list.append_items(list) combo.list.select_child(sel_child)