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
This commit is contained in:
David Hampton 2001-10-30 06:44:03 +00:00
parent 248dfef54a
commit be923e9407
2 changed files with 5 additions and 5 deletions

View File

@ -204,11 +204,6 @@ class EditPerson:
self.attr_list.set_column_visibility(2,Config.show_detail) self.attr_list.set_column_visibility(2,Config.show_detail)
self.addr_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: if Config.display_attr:
self.get_widget("user_label").set_text(Config.attr_name) self.get_widget("user_label").set_text(Config.attr_name)
val = "" val = ""
@ -285,6 +280,10 @@ class EditPerson:
def redraw_event_list(self): def redraw_event_list(self):
"""redraws the event list for the person""" """redraws the event list for the person"""
utils.redraw_list(self.elist,self.event_list,disp_event) 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.bplace.set_text(self.birth.getPlaceName())
self.dplace.set_text(self.death.getPlaceName()) self.dplace.set_text(self.death.getPlaceName())
self.bdate.set_text(self.birth.getDate()) self.bdate.set_text(self.birth.getDate())

View File

@ -331,6 +331,7 @@ def attach_places(values,combo,place):
sel_child = c sel_child = c
mymap[src] = c mymap[src] = c
combo.list.clear_items(0,-1)
combo.list.append_items(list) combo.list.append_items(list)
combo.list.select_child(sel_child) combo.list.select_child(sel_child)