Prevent erroneous place definitions from being added.

svn: r620
This commit is contained in:
David Hampton 2001-12-15 23:19:54 +00:00
parent 907e5b0ed7
commit a2faca3f16
2 changed files with 14 additions and 2 deletions

View File

@ -511,8 +511,8 @@ class EditPerson:
utils.redraw_list(self.elist,self.event_list,disp_event)
# Remember old combo list input
prev_btext = self.bpcombo.entry.get_text()
prev_dtext = self.dpcombo.entry.get_text()
prev_btext = utils.strip_id(self.bpcombo.entry.get_text())
prev_dtext = utils.strip_id(self.dpcombo.entry.get_text())
# Update combo lists to add in any new places
plist = self.db.getPlaceMap().values()

View File

@ -296,6 +296,18 @@ def view_photo(photo):
if os.fork() == 0:
os.execvp(args[0],args)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def strip_id(text):
index = string.rfind(text,'[')
if (index > 0):
text = text[:index]
text = string.rstrip(text)
return text
#-------------------------------------------------------------------------
#
#