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:
parent
248dfef54a
commit
be923e9407
@ -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())
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user