Import from XML builds placeTable properly

svn: r1005
This commit is contained in:
Don Allingham 2002-05-25 17:16:56 +00:00
parent d7d5849208
commit 96314bca72
3 changed files with 8 additions and 1 deletions

View File

@ -499,6 +499,7 @@ class GrampsParser:
if self.placeobj.get_title() == "": if self.placeobj.get_title() == "":
loc = self.placeobj.get_main_location() loc = self.placeobj.get_main_location()
self.placeobj.set_title(build_place_title(loc)) self.placeobj.set_title(build_place_title(loc))
self.db.buildPlaceDisplay(self.placeobj.getId())
self.palceobj = None self.palceobj = None
def stop_event(self,tag): def stop_event(self,tag):
@ -579,6 +580,7 @@ class GrampsParser:
self.source_ref = None self.source_ref = None
def stop_source(self,tag): def stop_source(self,tag):
self.db.buildSourceDisplay(self.source.getId())
self.source = None self.source = None
def stop_sauthor(self,tag): def stop_sauthor(self,tag):

View File

@ -230,7 +230,7 @@ class GrampsZODB(GrampsDB):
def setDefaultPerson(self,person): def setDefaultPerson(self,person):
"""sets the default Person to the passed instance""" """sets the default Person to the passed instance"""
GrampsDB.setDefaultPerson(self,person) GrampsDB.setDefaultPerson(self,person)
self.root()['default'] = person self.root['default'] = person

View File

@ -1851,6 +1851,11 @@ class GrampsDB(Persistent):
del self.personTable[okey] del self.personTable[okey]
self.personTable[nkey] = self.personMap[nkey].getDisplayInfo() self.personTable[nkey] = self.personMap[nkey].getDisplayInfo()
def buildPlaceDisplay(self,nkey,okey=None):
if nkey != okey and okey != None:
del self.placeTable[okey]
self.placeTable[nkey] = self.placeMap[nkey].getDisplayInfo()
def set_iprefix(self,val): def set_iprefix(self,val):
if _id_reg.search(val): if _id_reg.search(val):
self.iprefix = val self.iprefix = val