From 6cc7bd3aacbf701f67b427dcf166179356783f6d Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 23 Jun 2005 21:50:45 +0000 Subject: [PATCH] * src/RelLib.py (SourceNote.replace_source_references, MediaBase.replace_media_references,): Fix problem with replacing multiple occurrences. svn: r4870 --- gramps2/ChangeLog | 3 +++ gramps2/src/RelLib.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5ba1e21d4..b2c08950c 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -5,6 +5,9 @@ * src/Relationship.py (is_spouse): Use context. * src/get_strings: Add "__" to default keywords. * src/po/template.po: Update for 2.0.4. + * src/RelLib.py (SourceNote.replace_source_references, + MediaBase.replace_media_references,): Fix problem with replacing + multiple occurrences. 2005-06-23 Julio Sanchez * src/WriteGedcom.py: Fix family source references, fix spurious diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index 626bc20bb..dee29a7a5 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -528,7 +528,7 @@ class SourceNote(BaseObject,NoteBase): for ix_replace in xrange(n_replace): ix = refs_list.index(old_handle) self.source_list[ix].ref = new_handle - refs_list.pop(ix) + refs_list[ix] = new_handle for item in self.get_sourcref_child_list(): item.replace_source_references(old_handle,new_handle) @@ -628,7 +628,7 @@ class MediaBase: for ix_replace in xrange(n_replace): ix = refs_list.index(old_handle) self.media_list[ix].ref = new_handle - refs_list.pop(ix) + refs_list[ix] = new_handle class DateBase: """