Merge pull request #269 from prculley/nameedit

fix name_displayer.add_name_format so it won't create duplicates
This commit is contained in:
Sam Manzi 2016-11-12 12:57:27 +11:00 committed by GitHub
commit 905717f4f1

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