Make the new author_sort -> author try to split the author_sort into its individual authors, then handle them one by one.

This commit is contained in:
Charles Haley 2011-04-26 19:41:56 +01:00
parent 688c1a3f64
commit e8592b2f90

View File

@ -280,11 +280,16 @@ class AuthorSortEdit(EnLineEdit):
aus = self.current_val aus = self.current_val
meth = tweaks['author_sort_copy_method'] meth = tweaks['author_sort_copy_method']
if aus: if aus:
ln, _, rest = aus.partition(',') ans = []
for one in [a.strip() for a in aus.split('&')]:
if not one:
continue
ln, _, rest = one.partition(',')
if rest: if rest:
if meth in ('invert', 'nocomma', 'comma'): if meth in ('invert', 'nocomma', 'comma'):
aus = rest.strip() + ' ' + ln.strip() one = rest.strip() + ' ' + ln.strip()
self.authors_edit.current_val = [aus] ans.append(one)
self.authors_edit.current_val = ans
def auto_generate(self, *args): def auto_generate(self, *args):
au = unicode(self.authors_edit.text()) au = unicode(self.authors_edit.text())