Merge pull request #269 from prculley/nameedit
fix name_displayer.add_name_format so it won't create duplicates
This commit is contained in:
commit
905717f4f1
@ -433,6 +433,9 @@ class NameDisplay:
|
|||||||
self.set_default_format(self.get_default_format())
|
self.set_default_format(self.get_default_format())
|
||||||
|
|
||||||
def add_name_format(self, name, fmt_str):
|
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
|
num = -1
|
||||||
while num in self.name_formats:
|
while num in self.name_formats:
|
||||||
num -= 1
|
num -= 1
|
||||||
|
Loading…
Reference in New Issue
Block a user