diff --git a/src/EditPerson.py b/src/EditPerson.py index 93e2ec9a0..9de2ee6f6 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -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() diff --git a/src/utils.py b/src/utils.py index 11df15ed7..b555cb1a3 100644 --- a/src/utils.py +++ b/src/utils.py @@ -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 + #------------------------------------------------------------------------- # #