Prevent erroneous place definitions from being added.
svn: r620
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
| #------------------------------------------------------------------------- | ||||
| # | ||||
| # | ||||
|   | ||||
		Reference in New Issue
	
	Block a user