Fix problem with duplicate places on import

svn: r16083
This commit is contained in:
Nick Hall 2010-10-29 23:21:08 +00:00
parent 9c14d3b487
commit 862f66f77d

View File

@ -4356,19 +4356,12 @@ class GedcomParser(UpdateCallback):
place_handle = state.event.get_place_handle() place_handle = state.event.get_place_handle()
if place_handle: if place_handle:
place = self.dbase.get_place_from_handle(place_handle) place = self.dbase.get_place_from_handle(place_handle)
index = place.get_title() + location.get_street()
old_title = place.get_title()
place = self.__find_or_create_place(index)
if place.get_title():
place.set_title(old_title)
place_handle = place.handle
place.set_main_location(location)
else: else:
place = self.__find_or_create_place(line.data) place = self.__find_or_create_place(line.data)
place.set_title(line.data) place.set_title(line.data)
place_handle = place.handle place_handle = place.handle
place.set_main_location(location)
place.set_main_location(location)
map(place.add_note, note_list) map(place.add_note, note_list)