fix name_displayer.add_name_format so it won't create duplicates

This commit is contained in:
prculley 2016-11-09 13:32:35 -06:00
parent 676ff5601c
commit 4120c5a1bc

View File

@ -433,6 +433,9 @@ class NameDisplay:
self.set_default_format(self.get_default_format())
def add_name_format(self, name, fmt_str):
for num in self.name_formats:
if fmt_str in self.name_formats.get(num):
return num
num = -1
while num in self.name_formats:
num -= 1