Fix 0001393: Detailed descendant report crash on too many references.
svn: r9569
This commit is contained in:
parent
096db6b3a0
commit
7aa7acb355
@ -1,3 +1,7 @@
|
|||||||
|
2007-12-23 Brian Matherly <brian@gramps-project.org>
|
||||||
|
* src/ReportBase/_Bibliography.py:
|
||||||
|
Fix 0001393: Detailed descendant report crash on too many references.
|
||||||
|
|
||||||
2007-12-23 Raphael Ackermann <raphael.ackermann@gmail.com>
|
2007-12-23 Raphael Ackermann <raphael.ackermann@gmail.com>
|
||||||
* src/plugins/ExtractCity.py: Fix #0001160: Regular expressions,
|
* src/plugins/ExtractCity.py: Fix #0001160: Regular expressions,
|
||||||
dash/separator and non-ASCII characters on ExtractCity
|
dash/separator and non-ASCII characters on ExtractCity
|
||||||
|
@ -72,7 +72,17 @@ class Citation:
|
|||||||
@return: The key of the added reference among all the references.
|
@return: The key of the added reference among all the references.
|
||||||
@rtype: char
|
@rtype: char
|
||||||
"""
|
"""
|
||||||
key = string.lowercase[ len(self.__ref_list) ]
|
first_letter = ''
|
||||||
|
second_letter = ''
|
||||||
|
letter_count = len(string.lowercase)
|
||||||
|
ref_count = len(self.__ref_list)
|
||||||
|
if ref_count > letter_count:
|
||||||
|
# If there are more than 26 references, we need to use two
|
||||||
|
# characters to uniquely identify them all.
|
||||||
|
first_letter = string.lowercase[ ref_count / letter_count ]
|
||||||
|
second_letter = string.lowercase[ ref_count % letter_count ]
|
||||||
|
|
||||||
|
key = first_letter + second_letter
|
||||||
self.__ref_list.append((key,source_ref))
|
self.__ref_list.append((key,source_ref))
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user